diff --git a/src/kusto/HISTORY.rst b/src/kusto/HISTORY.rst
index 077c582127b..1c139576ba0 100644
--- a/src/kusto/HISTORY.rst
+++ b/src/kusto/HISTORY.rst
@@ -6,7 +6,3 @@ Release History
0.1.0
++++++
* Initial release.
-
-0.2.0
-++++++
-* Adding Engine v3 support and User-Assigned-Identity
diff --git a/src/kusto/azext_kusto/azext_metadata.json b/src/kusto/azext_kusto/azext_metadata.json
index 4f48fa652a5..cfc30c747c7 100644
--- a/src/kusto/azext_kusto/azext_metadata.json
+++ b/src/kusto/azext_kusto/azext_metadata.json
@@ -1,4 +1,4 @@
{
"azext.isExperimental": true,
- "azext.minCliCoreVersion": "2.11.0"
+ "azext.minCliCoreVersion": "2.15.0"
}
\ No newline at end of file
diff --git a/src/kusto/azext_kusto/generated/_client_factory.py b/src/kusto/azext_kusto/generated/_client_factory.py
index 7c129ea935b..8f733109dcf 100644
--- a/src/kusto/azext_kusto/generated/_client_factory.py
+++ b/src/kusto/azext_kusto/generated/_client_factory.py
@@ -11,30 +11,30 @@
def cf_kusto_cl(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
- from ..vendored_sdks.kusto import KustoManagementClient
+ from azext_kusto.vendored_sdks.kusto import KustoManagementClient
return get_mgmt_service_client(cli_ctx,
KustoManagementClient)
def cf_cluster(cli_ctx, *_):
- return cf_kusto_cl(cli_ctx).cluster
+ return cf_kusto_cl(cli_ctx).clusters
def cf_cluster_principal_assignment(cli_ctx, *_):
- return cf_kusto_cl(cli_ctx).cluster_principal_assignment
+ return cf_kusto_cl(cli_ctx).cluster_principal_assignments
def cf_database(cli_ctx, *_):
- return cf_kusto_cl(cli_ctx).database
+ return cf_kusto_cl(cli_ctx).databases
def cf_database_principal_assignment(cli_ctx, *_):
- return cf_kusto_cl(cli_ctx).database_principal_assignment
+ return cf_kusto_cl(cli_ctx).database_principal_assignments
def cf_attached_database_configuration(cli_ctx, *_):
- return cf_kusto_cl(cli_ctx).attached_database_configuration
+ return cf_kusto_cl(cli_ctx).attached_database_configurations
def cf_data_connection(cli_ctx, *_):
- return cf_kusto_cl(cli_ctx).data_connection
+ return cf_kusto_cl(cli_ctx).data_connections
diff --git a/src/kusto/azext_kusto/generated/_help.py b/src/kusto/azext_kusto/generated/_help.py
index 78099e62b47..7c33cb8450a 100644
--- a/src/kusto/azext_kusto/generated/_help.py
+++ b/src/kusto/azext_kusto/generated/_help.py
@@ -14,16 +14,20 @@
helps['kusto cluster'] = """
type: group
- short-summary: kusto cluster
+ short-summary: Manage cluster with kusto
"""
helps['kusto cluster list'] = """
type: command
- short-summary: "Lists all Kusto clusters within a subscription."
+ short-summary: "Lists all Kusto clusters within a resource group. And Lists all Kusto clusters within a \
+subscription."
examples:
- name: KustoClustersListByResourceGroup
text: |-
az kusto cluster list --resource-group "kustorptest"
+ - name: KustoClustersList
+ text: |-
+ az kusto cluster list
"""
helps['kusto cluster show'] = """
@@ -37,7 +41,7 @@
helps['kusto cluster create'] = """
type: command
- short-summary: "Create or update a Kusto cluster."
+ short-summary: "Create a Kusto cluster."
parameters:
- name: --sku
short-summary: "The SKU of the cluster."
@@ -84,8 +88,8 @@
examples:
- name: KustoClustersCreateOrUpdate
text: |-
- az kusto cluster create --name "kustoclusterrptest4" --identity-type "SystemAssigned" --location \
-"westus" --enable-double-encryption false --enable-purge true --enable-streaming-ingest true --sku name="Standard_L8s" \
+ az kusto cluster create --name "kustoclusterrptest4" --type "SystemAssigned" --location "westus" \
+--enable-double-encryption false --enable-purge true --enable-streaming-ingest true --sku name="Standard_L8s" \
capacity=2 tier="Standard" --resource-group "kustorptest"
"""
@@ -138,9 +142,9 @@
examples:
- name: KustoClustersUpdate
text: |-
- az kusto cluster update --name "kustoclusterrptest4" --identity-type "SystemAssigned" --location \
-"westus" --enable-purge true --enable-streaming-ingest true --engine-type "V2" --key-vault-properties \
-key-name="keyName" key-vault-uri="https://dummy.keyvault.com" key-version="keyVersion" --resource-group "kustorptest"
+ az kusto cluster update --name "kustoclusterrptest4" --type "SystemAssigned" --location "westus" \
+--enable-purge true --enable-streaming-ingest true --engine-type "V2" --key-vault-properties key-name="keyName" \
+key-vault-uri="https://dummy.keyvault.com" key-version="keyVersion" --resource-group "kustorptest"
"""
helps['kusto cluster delete'] = """
@@ -212,11 +216,15 @@
helps['kusto cluster list-sku'] = """
type: command
- short-summary: "Lists eligible SKUs for Kusto resource provider."
+ short-summary: "Returns the SKUs available for the provided resource. And Lists eligible SKUs for Kusto resource \
+provider."
examples:
- name: KustoClustersListResourceSkus
text: |-
az kusto cluster list-sku --name "kustoclusterrptest4" --resource-group "kustorptest"
+ - name: KustoClustersListSkus
+ text: |-
+ az kusto cluster list-sku
"""
helps['kusto cluster remove-language-extension'] = """
@@ -273,7 +281,7 @@
helps['kusto cluster-principal-assignment'] = """
type: group
- short-summary: kusto cluster-principal-assignment
+ short-summary: Manage cluster principal assignment with kusto
"""
helps['kusto cluster-principal-assignment list'] = """
@@ -309,7 +317,7 @@
helps['kusto cluster-principal-assignment update'] = """
type: command
- short-summary: "Create a Kusto cluster principalAssignment."
+ short-summary: "Update a Kusto cluster principalAssignment."
"""
helps['kusto cluster-principal-assignment delete'] = """
@@ -346,7 +354,7 @@
helps['kusto database'] = """
type: group
- short-summary: kusto database
+ short-summary: Manage database with kusto
"""
helps['kusto database list'] = """
@@ -370,7 +378,7 @@
helps['kusto database create'] = """
type: command
- short-summary: "Creates or updates a database."
+ short-summary: "Create a database."
parameters:
- name: --read-write-database
short-summary: "Class representing a read write database."
@@ -521,7 +529,7 @@
helps['kusto database-principal-assignment'] = """
type: group
- short-summary: kusto database-principal-assignment
+ short-summary: Manage database principal assignment with kusto
"""
helps['kusto database-principal-assignment list'] = """
@@ -558,7 +566,7 @@
helps['kusto database-principal-assignment update'] = """
type: command
- short-summary: "Creates a Kusto cluster database principalAssignment."
+ short-summary: "Update a Kusto cluster database principalAssignment."
"""
helps['kusto database-principal-assignment delete'] = """
@@ -595,7 +603,7 @@
helps['kusto attached-database-configuration'] = """
type: group
- short-summary: kusto attached-database-configuration
+ short-summary: Manage attached database configuration with kusto
"""
helps['kusto attached-database-configuration list'] = """
@@ -620,7 +628,7 @@
helps['kusto attached-database-configuration create'] = """
type: command
- short-summary: "Creates or updates an attached database configuration."
+ short-summary: "Create an attached database configuration."
examples:
- name: AttachedDatabaseConfigurationsCreateOrUpdate
text: |-
@@ -632,7 +640,7 @@
helps['kusto attached-database-configuration update'] = """
type: command
- short-summary: "Creates or updates an attached database configuration."
+ short-summary: "Update an attached database configuration."
"""
helps['kusto attached-database-configuration delete'] = """
@@ -669,7 +677,7 @@
helps['kusto data-connection'] = """
type: group
- short-summary: kusto data-connection
+ short-summary: Manage data connection with kusto
"""
helps['kusto data-connection list'] = """
@@ -694,22 +702,22 @@
helps['kusto data-connection event-grid'] = """
type: group
- short-summary: kusto data-connection sub group event-grid
+ short-summary: Manage data connection with kusto sub group event-grid
"""
helps['kusto data-connection event-grid create'] = """
type: command
- short-summary: "Creates or updates a data connection."
+ short-summary: "Create a data connection."
"""
helps['kusto data-connection event-hub'] = """
type: group
- short-summary: kusto data-connection sub group event-hub
+ short-summary: Manage data connection with kusto sub group event-hub
"""
helps['kusto data-connection event-hub create'] = """
type: command
- short-summary: "Creates or updates a data connection."
+ short-summary: "Create a data connection."
examples:
- name: KustoDataConnectionsCreateOrUpdate
text: |-
@@ -721,12 +729,12 @@
helps['kusto data-connection iot-hub'] = """
type: group
- short-summary: kusto data-connection sub group iot-hub
+ short-summary: Manage data connection with kusto sub group iot-hub
"""
helps['kusto data-connection iot-hub create'] = """
type: command
- short-summary: "Creates or updates a data connection."
+ short-summary: "Create a data connection."
"""
helps['kusto data-connection event-grid update'] = """
diff --git a/src/kusto/azext_kusto/generated/_params.py b/src/kusto/azext_kusto/generated/_params.py
index e192ea90056..4bbcd2b076c 100644
--- a/src/kusto/azext_kusto/generated/_params.py
+++ b/src/kusto/azext_kusto/generated/_params.py
@@ -49,71 +49,73 @@ def load_arguments(self, _):
c.argument('cluster_name', options_list=['--name', '-n', '--cluster-name'], type=str, help='The name of the '
'Kusto cluster.')
c.argument('tags', tags_type)
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
+ c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
validator=get_default_location_from_resource_group)
c.argument('sku', action=AddSku, nargs='+', help='The SKU of the cluster.')
- c.argument('zones', nargs='*', help='The availability zones of the cluster.')
- c.argument('trusted_external_tenants', action=AddTrustedExternalTenants, nargs='*', help='The cluster\'s '
+ c.argument('zones', nargs='+', help='The availability zones of the cluster.')
+ c.argument('trusted_external_tenants', action=AddTrustedExternalTenants, nargs='+', help='The cluster\'s '
'external tenants.')
- c.argument('optimized_autoscale', action=AddOptimizedAutoscale, nargs='*', help='Optimized auto scale '
+ c.argument('optimized_autoscale', action=AddOptimizedAutoscale, nargs='+', help='Optimized auto scale '
'definition.')
c.argument('enable_disk_encryption', arg_type=get_three_state_flag(), help='A boolean value that indicates if '
'the cluster\'s disks are encrypted.')
c.argument('enable_streaming_ingest', arg_type=get_three_state_flag(), help='A boolean value that indicates if '
'the streaming ingest is enabled.')
- c.argument('virtual_network_configuration', action=AddVirtualNetworkConfiguration, nargs='*', help='Virtual '
+ c.argument('virtual_network_configuration', action=AddVirtualNetworkConfiguration, nargs='+', help='Virtual '
'network definition.')
- c.argument('key_vault_properties', action=AddKeyVaultProperties, nargs='*', help='KeyVault properties for the '
+ c.argument('key_vault_properties', action=AddKeyVaultProperties, nargs='+', help='KeyVault properties for the '
'cluster encryption.')
c.argument('enable_purge', arg_type=get_three_state_flag(), help='A boolean value that indicates if the purge '
'operations are enabled.')
c.argument('enable_double_encryption', arg_type=get_three_state_flag(), help='A boolean value that indicates '
'if double encryption is enabled.')
c.argument('engine_type', arg_type=get_enum_type(['V2', 'V3']), help='The engine type')
- c.argument('identity_type', arg_type=get_enum_type(['None', 'SystemAssigned', 'UserAssigned', 'SystemAssigned, '
- 'UserAssigned']), help='The type of managed identity used. '
- 'The type \'SystemAssigned, UserAssigned\' includes both an implicitly created identity and a set '
- 'of user-assigned identities. The type \'None\' will remove all identities.')
- c.argument('identity_user_assigned_identities', type=validate_file_or_dict, help='The list of user identities '
+ c.argument('type_', options_list=['--type'], arg_type=get_enum_type(['None', 'SystemAssigned', 'UserAssigned',
+ 'SystemAssigned, UserAssigned']),
+ help='The type of managed identity used. The type \'SystemAssigned, UserAssigned\' includes both an '
+ 'implicitly created identity and a set of user-assigned identities. The type \'None\' will remove '
+ 'all identities.', arg_group='Identity')
+ c.argument('user_assigned_identities', type=validate_file_or_dict, help='The list of user identities '
'associated with the Kusto cluster. The user identity dictionary key references will be ARM '
'resource ids in the form: \'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/prov'
'iders/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}\'. Expected value: '
- 'json-string/@json-file.')
+ 'json-string/@json-file.', arg_group='Identity')
with self.argument_context('kusto cluster update') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', options_list=['--name', '-n', '--cluster-name'], type=str, help='The name of the '
'Kusto cluster.', id_part='name')
c.argument('tags', tags_type)
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
+ c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
validator=get_default_location_from_resource_group)
- c.argument('sku', action=AddSku, nargs='*', help='The SKU of the cluster.')
- c.argument('trusted_external_tenants', action=AddTrustedExternalTenants, nargs='*', help='The cluster\'s '
+ c.argument('sku', action=AddSku, nargs='+', help='The SKU of the cluster.')
+ c.argument('trusted_external_tenants', action=AddTrustedExternalTenants, nargs='+', help='The cluster\'s '
'external tenants.')
- c.argument('optimized_autoscale', action=AddOptimizedAutoscale, nargs='*', help='Optimized auto scale '
+ c.argument('optimized_autoscale', action=AddOptimizedAutoscale, nargs='+', help='Optimized auto scale '
'definition.')
c.argument('enable_disk_encryption', arg_type=get_three_state_flag(), help='A boolean value that indicates if '
'the cluster\'s disks are encrypted.')
c.argument('enable_streaming_ingest', arg_type=get_three_state_flag(), help='A boolean value that indicates if '
'the streaming ingest is enabled.')
- c.argument('virtual_network_configuration', action=AddVirtualNetworkConfiguration, nargs='*', help='Virtual '
+ c.argument('virtual_network_configuration', action=AddVirtualNetworkConfiguration, nargs='+', help='Virtual '
'network definition.')
- c.argument('key_vault_properties', action=AddKeyVaultProperties, nargs='*', help='KeyVault properties for the '
+ c.argument('key_vault_properties', action=AddKeyVaultProperties, nargs='+', help='KeyVault properties for the '
'cluster encryption.')
c.argument('enable_purge', arg_type=get_three_state_flag(), help='A boolean value that indicates if the purge '
'operations are enabled.')
c.argument('enable_double_encryption', arg_type=get_three_state_flag(), help='A boolean value that indicates '
'if double encryption is enabled.')
c.argument('engine_type', arg_type=get_enum_type(['V2', 'V3']), help='The engine type')
- c.argument('identity_type', arg_type=get_enum_type(['None', 'SystemAssigned', 'UserAssigned', 'SystemAssigned, '
- 'UserAssigned']), help='The type of managed identity used. '
- 'The type \'SystemAssigned, UserAssigned\' includes both an implicitly created identity and a set '
- 'of user-assigned identities. The type \'None\' will remove all identities.')
- c.argument('identity_user_assigned_identities', type=validate_file_or_dict, help='The list of user identities '
+ c.argument('type_', options_list=['--type'], arg_type=get_enum_type(['None', 'SystemAssigned', 'UserAssigned',
+ 'SystemAssigned, UserAssigned']),
+ help='The type of managed identity used. The type \'SystemAssigned, UserAssigned\' includes both an '
+ 'implicitly created identity and a set of user-assigned identities. The type \'None\' will remove '
+ 'all identities.', arg_group='Identity')
+ c.argument('user_assigned_identities', type=validate_file_or_dict, help='The list of user identities '
'associated with the Kusto cluster. The user identity dictionary key references will be ARM '
'resource ids in the form: \'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/prov'
'iders/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}\'. Expected value: '
- 'json-string/@json-file.')
+ 'json-string/@json-file.', arg_group='Identity')
with self.argument_context('kusto cluster delete') as c:
c.argument('resource_group_name', resource_group_name_type)
@@ -124,7 +126,7 @@ def load_arguments(self, _):
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', options_list=['--name', '-n', '--cluster-name'], type=str, help='The name of the '
'Kusto cluster.', id_part='name')
- c.argument('value', action=AddClustersValue, nargs='*', help='The list of language extensions.')
+ c.argument('value', action=AddClustersValue, nargs='+', help='The list of language extensions.')
with self.argument_context('kusto cluster detach-follower-database') as c:
c.argument('resource_group_name', resource_group_name_type)
@@ -159,7 +161,7 @@ def load_arguments(self, _):
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', options_list=['--name', '-n', '--cluster-name'], type=str, help='The name of the '
'Kusto cluster.', id_part='name')
- c.argument('value', action=AddClustersValue, nargs='*', help='The list of language extensions.')
+ c.argument('value', action=AddClustersValue, nargs='+', help='The list of language extensions.')
with self.argument_context('kusto cluster start') as c:
c.argument('resource_group_name', resource_group_name_type)
@@ -183,8 +185,8 @@ def load_arguments(self, _):
with self.argument_context('kusto cluster-principal-assignment show') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.', id_part=''
- 'child_name_1')
+ c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.',
+ id_part='child_name_1')
with self.argument_context('kusto cluster-principal-assignment create') as c:
c.argument('resource_group_name', resource_group_name_type)
@@ -200,26 +202,27 @@ def load_arguments(self, _):
with self.argument_context('kusto cluster-principal-assignment update') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.', id_part=''
- 'child_name_1')
+ c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.',
+ id_part='child_name_1')
c.argument('principal_id', type=str, help='The principal ID assigned to the cluster principal. It can be a '
'user email, application ID, or security group name.')
c.argument('role', arg_type=get_enum_type(['AllDatabasesAdmin', 'AllDatabasesViewer']), help='Cluster '
'principal role.')
c.argument('tenant_id', type=str, help='The tenant id of the principal')
c.argument('principal_type', arg_type=get_enum_type(['App', 'Group', 'User']), help='Principal type.')
+ c.ignore('parameters')
with self.argument_context('kusto cluster-principal-assignment delete') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.', id_part=''
- 'child_name_1')
+ c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.',
+ id_part='child_name_1')
with self.argument_context('kusto cluster-principal-assignment wait') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.', id_part=''
- 'child_name_1')
+ c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.',
+ id_part='child_name_1')
with self.argument_context('kusto database list') as c:
c.argument('resource_group_name', resource_group_name_type)
@@ -228,40 +231,40 @@ def load_arguments(self, _):
with self.argument_context('kusto database show') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
with self.argument_context('kusto database create') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.')
c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.')
- c.argument('read_write_database', action=AddReadWriteDatabase, nargs='*', help='Class representing a read '
+ c.argument('read_write_database', action=AddReadWriteDatabase, nargs='+', help='Class representing a read '
'write database.', arg_group='Parameters')
- c.argument('read_only_following_database', action=AddReadOnlyFollowingDatabase, nargs='*', help='Class '
+ c.argument('read_only_following_database', action=AddReadOnlyFollowingDatabase, nargs='+', help='Class '
'representing a read only following database.', arg_group='Parameters')
with self.argument_context('kusto database update') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
- c.argument('read_write_database', action=AddReadWriteDatabase, nargs='*', help='Class representing a read '
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
+ c.argument('read_write_database', action=AddReadWriteDatabase, nargs='+', help='Class representing a read '
'write database.', arg_group='Parameters')
- c.argument('read_only_following_database', action=AddReadOnlyFollowingDatabase, nargs='*', help='Class '
+ c.argument('read_only_following_database', action=AddReadOnlyFollowingDatabase, nargs='+', help='Class '
'representing a read only following database.', arg_group='Parameters')
with self.argument_context('kusto database delete') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
with self.argument_context('kusto database add-principal') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
- c.argument('value', action=AddDatabasesValue, nargs='*', help='The list of Kusto database principals.')
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
+ c.argument('value', action=AddDatabasesValue, nargs='+', help='The list of Kusto database principals.')
with self.argument_context('kusto database list-principal') as c:
c.argument('resource_group_name', resource_group_name_type)
@@ -271,15 +274,15 @@ def load_arguments(self, _):
with self.argument_context('kusto database remove-principal') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
- c.argument('value', action=AddDatabasesValue, nargs='*', help='The list of Kusto database principals.')
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
+ c.argument('value', action=AddDatabasesValue, nargs='+', help='The list of Kusto database principals.')
with self.argument_context('kusto database wait') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
with self.argument_context('kusto database-principal-assignment list') as c:
c.argument('resource_group_name', resource_group_name_type)
@@ -289,10 +292,10 @@ def load_arguments(self, _):
with self.argument_context('kusto database-principal-assignment show') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
- c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.', id_part=''
- 'child_name_2')
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
+ c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.',
+ id_part='child_name_2')
with self.argument_context('kusto database-principal-assignment create') as c:
c.argument('resource_group_name', resource_group_name_type)
@@ -301,7 +304,7 @@ def load_arguments(self, _):
c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.')
c.argument('principal_id', type=str, help='The principal ID assigned to the database principal. It can be a '
'user email, application ID, or security group name.')
- c.argument('role', arg_type=get_enum_type(['Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers', ''
+ c.argument('role', arg_type=get_enum_type(['Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers',
'Viewer']), help='Database principal role.')
c.argument('tenant_id', type=str, help='The tenant id of the principal')
c.argument('principal_type', arg_type=get_enum_type(['App', 'Group', 'User']), help='Principal type.')
@@ -309,32 +312,33 @@ def load_arguments(self, _):
with self.argument_context('kusto database-principal-assignment update') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
- c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.', id_part=''
- 'child_name_2')
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
+ c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.',
+ id_part='child_name_2')
c.argument('principal_id', type=str, help='The principal ID assigned to the database principal. It can be a '
'user email, application ID, or security group name.')
- c.argument('role', arg_type=get_enum_type(['Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers', ''
+ c.argument('role', arg_type=get_enum_type(['Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers',
'Viewer']), help='Database principal role.')
c.argument('tenant_id', type=str, help='The tenant id of the principal')
c.argument('principal_type', arg_type=get_enum_type(['App', 'Group', 'User']), help='Principal type.')
+ c.ignore('parameters')
with self.argument_context('kusto database-principal-assignment delete') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
- c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.', id_part=''
- 'child_name_2')
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
+ c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.',
+ id_part='child_name_2')
with self.argument_context('kusto database-principal-assignment wait') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
- c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.', id_part=''
- 'child_name_2')
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
+ c.argument('principal_assignment_name', type=str, help='The name of the Kusto principalAssignment.',
+ id_part='child_name_2')
with self.argument_context('kusto attached-database-configuration list') as c:
c.argument('resource_group_name', resource_group_name_type)
@@ -343,51 +347,52 @@ def load_arguments(self, _):
with self.argument_context('kusto attached-database-configuration show') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('attached_database_configuration_name', options_list=['--name', '-n', ''
+ c.argument('attached_database_configuration_name', options_list=['--name', '-n',
'--attached-database-configuration-name'],
type=str, help='The name of the attached database configuration.', id_part='child_name_1')
with self.argument_context('kusto attached-database-configuration create') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.')
- c.argument('attached_database_configuration_name', options_list=['--name', '-n', ''
+ c.argument('attached_database_configuration_name', options_list=['--name', '-n',
'--attached-database-configuration-name'],
type=str, help='The name of the attached database configuration.')
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
+ c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
validator=get_default_location_from_resource_group)
c.argument('database_name', type=str, help='The name of the database which you would like to attach, use * if '
'you want to follow all current and future databases.')
c.argument('cluster_resource_id', type=str, help='The resource id of the cluster where the databases you would '
'like to attach reside.')
- c.argument('default_principals_modification_kind', arg_type=get_enum_type(['Union', 'Replace', 'None']), help=''
- 'The default principals modification kind')
+ c.argument('default_principals_modification_kind', arg_type=get_enum_type(['Union', 'Replace', 'None']),
+ help='The default principals modification kind')
with self.argument_context('kusto attached-database-configuration update') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('attached_database_configuration_name', options_list=['--name', '-n', ''
+ c.argument('attached_database_configuration_name', options_list=['--name', '-n',
'--attached-database-configuration-name'],
type=str, help='The name of the attached database configuration.', id_part='child_name_1')
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
+ c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
validator=get_default_location_from_resource_group)
c.argument('database_name', type=str, help='The name of the database which you would like to attach, use * if '
'you want to follow all current and future databases.')
c.argument('cluster_resource_id', type=str, help='The resource id of the cluster where the databases you would '
'like to attach reside.')
- c.argument('default_principals_modification_kind', arg_type=get_enum_type(['Union', 'Replace', 'None']), help=''
- 'The default principals modification kind')
+ c.argument('default_principals_modification_kind', arg_type=get_enum_type(['Union', 'Replace', 'None']),
+ help='The default principals modification kind')
+ c.ignore('parameters')
with self.argument_context('kusto attached-database-configuration delete') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('attached_database_configuration_name', options_list=['--name', '-n', ''
+ c.argument('attached_database_configuration_name', options_list=['--name', '-n',
'--attached-database-configuration-name'],
type=str, help='The name of the attached database configuration.', id_part='child_name_1')
with self.argument_context('kusto attached-database-configuration wait') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('attached_database_configuration_name', options_list=['--name', '-n', ''
+ c.argument('attached_database_configuration_name', options_list=['--name', '-n',
'--attached-database-configuration-name'],
type=str, help='The name of the attached database configuration.', id_part='child_name_1')
@@ -399,18 +404,18 @@ def load_arguments(self, _):
with self.argument_context('kusto data-connection show') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
- c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str, help=''
- 'The name of the data connection.', id_part='child_name_2')
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
+ c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str,
+ help='The name of the data connection.', id_part='child_name_2')
with self.argument_context('kusto data-connection event-grid create') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.')
c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.')
- c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str, help=''
- 'The name of the data connection.')
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
+ c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str,
+ help='The name of the data connection.')
+ c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
validator=get_default_location_from_resource_group)
c.argument('storage_account_resource_id', type=str, help='The resource ID of the storage account where the '
'data resides.')
@@ -421,13 +426,13 @@ def load_arguments(self, _):
'information can be added to each message.')
c.argument('mapping_rule_name', type=str, help='The mapping rule to be used to ingest the data. Optionally the '
'mapping information can be added to each message.')
- c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', ''
+ c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV',
'TXT', 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC',
'APACHEAVRO', 'W3CLOGFILE']), help='The data format of the '
'message. Optionally the data format can be added to each message.')
c.argument('ignore_first_record', arg_type=get_three_state_flag(), help='A Boolean value that, if set to true, '
'indicates that ingestion should ignore the first record of every file')
- c.argument('blob_storage_event_type', arg_type=get_enum_type(['Microsoft.Storage.BlobCreated', ''
+ c.argument('blob_storage_event_type', arg_type=get_enum_type(['Microsoft.Storage.BlobCreated',
'Microsoft.Storage.BlobRenamed']), help='The '
'name of blob storage event type to process.')
@@ -435,9 +440,9 @@ def load_arguments(self, _):
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.')
c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.')
- c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str, help=''
- 'The name of the data connection.')
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
+ c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str,
+ help='The name of the data connection.')
+ c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
validator=get_default_location_from_resource_group)
c.argument('event_hub_resource_id', type=str, help='The resource ID of the event hub to be used to create a '
'data connection.')
@@ -446,11 +451,11 @@ def load_arguments(self, _):
'information can be added to each message.')
c.argument('mapping_rule_name', type=str, help='The mapping rule to be used to ingest the data. Optionally the '
'mapping information can be added to each message.')
- c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', ''
+ c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV',
'TXT', 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC',
'APACHEAVRO', 'W3CLOGFILE']), help='The data format of the '
'message. Optionally the data format can be added to each message.')
- c.argument('event_system_properties', nargs='*', help='System properties of the event hub')
+ c.argument('event_system_properties', nargs='+', help='System properties of the event hub')
c.argument('compression', arg_type=get_enum_type(['None', 'GZip']), help='The event hub messages compression '
'type')
@@ -458,9 +463,9 @@ def load_arguments(self, _):
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.')
c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.')
- c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str, help=''
- 'The name of the data connection.')
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
+ c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str,
+ help='The name of the data connection.')
+ c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
validator=get_default_location_from_resource_group)
c.argument('iot_hub_resource_id', type=str, help='The resource ID of the Iot hub to be used to create a data '
'connection.')
@@ -469,21 +474,21 @@ def load_arguments(self, _):
'information can be added to each message.')
c.argument('mapping_rule_name', type=str, help='The mapping rule to be used to ingest the data. Optionally the '
'mapping information can be added to each message.')
- c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', ''
+ c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV',
'TXT', 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC',
'APACHEAVRO', 'W3CLOGFILE']), help='The data format of the '
'message. Optionally the data format can be added to each message.')
- c.argument('event_system_properties', nargs='*', help='System properties of the iot hub')
+ c.argument('event_system_properties', nargs='+', help='System properties of the iot hub')
c.argument('shared_access_policy_name', type=str, help='The name of the share access policy')
with self.argument_context('kusto data-connection event-grid update') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
- c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str, help=''
- 'The name of the data connection.', id_part='child_name_2')
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
+ c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str,
+ help='The name of the data connection.', id_part='child_name_2')
+ c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
validator=get_default_location_from_resource_group)
c.argument('storage_account_resource_id', type=str, help='The resource ID of the storage account where the '
'data resides.')
@@ -494,24 +499,24 @@ def load_arguments(self, _):
'information can be added to each message.')
c.argument('mapping_rule_name', type=str, help='The mapping rule to be used to ingest the data. Optionally the '
'mapping information can be added to each message.')
- c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', ''
+ c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV',
'TXT', 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC',
'APACHEAVRO', 'W3CLOGFILE']), help='The data format of the '
'message. Optionally the data format can be added to each message.')
c.argument('ignore_first_record', arg_type=get_three_state_flag(), help='A Boolean value that, if set to true, '
'indicates that ingestion should ignore the first record of every file')
- c.argument('blob_storage_event_type', arg_type=get_enum_type(['Microsoft.Storage.BlobCreated', ''
+ c.argument('blob_storage_event_type', arg_type=get_enum_type(['Microsoft.Storage.BlobCreated',
'Microsoft.Storage.BlobRenamed']), help='The '
'name of blob storage event type to process.')
with self.argument_context('kusto data-connection event-hub update') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
- c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str, help=''
- 'The name of the data connection.', id_part='child_name_2')
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
+ c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str,
+ help='The name of the data connection.', id_part='child_name_2')
+ c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
validator=get_default_location_from_resource_group)
c.argument('event_hub_resource_id', type=str, help='The resource ID of the event hub to be used to create a '
'data connection.')
@@ -520,22 +525,22 @@ def load_arguments(self, _):
'information can be added to each message.')
c.argument('mapping_rule_name', type=str, help='The mapping rule to be used to ingest the data. Optionally the '
'mapping information can be added to each message.')
- c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', ''
+ c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV',
'TXT', 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC',
'APACHEAVRO', 'W3CLOGFILE']), help='The data format of the '
'message. Optionally the data format can be added to each message.')
- c.argument('event_system_properties', nargs='*', help='System properties of the event hub')
+ c.argument('event_system_properties', nargs='+', help='System properties of the event hub')
c.argument('compression', arg_type=get_enum_type(['None', 'GZip']), help='The event hub messages compression '
'type')
with self.argument_context('kusto data-connection iot-hub update') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
- c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str, help=''
- 'The name of the data connection.', id_part='child_name_2')
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
+ c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str,
+ help='The name of the data connection.', id_part='child_name_2')
+ c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
validator=get_default_location_from_resource_group)
c.argument('iot_hub_resource_id', type=str, help='The resource ID of the Iot hub to be used to create a data '
'connection.')
@@ -544,29 +549,29 @@ def load_arguments(self, _):
'information can be added to each message.')
c.argument('mapping_rule_name', type=str, help='The mapping rule to be used to ingest the data. Optionally the '
'mapping information can be added to each message.')
- c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', ''
+ c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV',
'TXT', 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC',
'APACHEAVRO', 'W3CLOGFILE']), help='The data format of the '
'message. Optionally the data format can be added to each message.')
- c.argument('event_system_properties', nargs='*', help='System properties of the iot hub')
+ c.argument('event_system_properties', nargs='+', help='System properties of the iot hub')
c.argument('shared_access_policy_name', type=str, help='The name of the share access policy')
with self.argument_context('kusto data-connection delete') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
- c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str, help=''
- 'The name of the data connection.', id_part='child_name_2')
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
+ c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str,
+ help='The name of the data connection.', id_part='child_name_2')
with self.argument_context('kusto data-connection event-grid data-connection-validation') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
- c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str, help=''
- 'The name of the data connection.')
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
+ c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str,
+ help='The name of the data connection.')
+ c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
validator=get_default_location_from_resource_group)
c.argument('storage_account_resource_id', type=str, help='The resource ID of the storage account where the '
'data resides.')
@@ -577,24 +582,24 @@ def load_arguments(self, _):
'information can be added to each message.')
c.argument('mapping_rule_name', type=str, help='The mapping rule to be used to ingest the data. Optionally the '
'mapping information can be added to each message.')
- c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', ''
+ c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV',
'TXT', 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC',
'APACHEAVRO', 'W3CLOGFILE']), help='The data format of the '
'message. Optionally the data format can be added to each message.')
c.argument('ignore_first_record', arg_type=get_three_state_flag(), help='A Boolean value that, if set to true, '
'indicates that ingestion should ignore the first record of every file')
- c.argument('blob_storage_event_type', arg_type=get_enum_type(['Microsoft.Storage.BlobCreated', ''
+ c.argument('blob_storage_event_type', arg_type=get_enum_type(['Microsoft.Storage.BlobCreated',
'Microsoft.Storage.BlobRenamed']), help='The '
'name of blob storage event type to process.')
with self.argument_context('kusto data-connection event-hub data-connection-validation') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
- c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str, help=''
- 'The name of the data connection.')
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
+ c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str,
+ help='The name of the data connection.')
+ c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
validator=get_default_location_from_resource_group)
c.argument('event_hub_resource_id', type=str, help='The resource ID of the event hub to be used to create a '
'data connection.')
@@ -603,22 +608,22 @@ def load_arguments(self, _):
'information can be added to each message.')
c.argument('mapping_rule_name', type=str, help='The mapping rule to be used to ingest the data. Optionally the '
'mapping information can be added to each message.')
- c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', ''
+ c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV',
'TXT', 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC',
'APACHEAVRO', 'W3CLOGFILE']), help='The data format of the '
'message. Optionally the data format can be added to each message.')
- c.argument('event_system_properties', nargs='*', help='System properties of the event hub')
+ c.argument('event_system_properties', nargs='+', help='System properties of the event hub')
c.argument('compression', arg_type=get_enum_type(['None', 'GZip']), help='The event hub messages compression '
'type')
with self.argument_context('kusto data-connection iot-hub data-connection-validation') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
- c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str, help=''
- 'The name of the data connection.')
- c.argument('location', arg_type=get_location_type(self.cli_ctx),
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
+ c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str,
+ help='The name of the data connection.')
+ c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
validator=get_default_location_from_resource_group)
c.argument('iot_hub_resource_id', type=str, help='The resource ID of the Iot hub to be used to create a data '
'connection.')
@@ -627,17 +632,17 @@ def load_arguments(self, _):
'information can be added to each message.')
c.argument('mapping_rule_name', type=str, help='The mapping rule to be used to ingest the data. Optionally the '
'mapping information can be added to each message.')
- c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', ''
+ c.argument('data_format', arg_type=get_enum_type(['MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV',
'TXT', 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC',
'APACHEAVRO', 'W3CLOGFILE']), help='The data format of the '
'message. Optionally the data format can be added to each message.')
- c.argument('event_system_properties', nargs='*', help='System properties of the iot hub')
+ c.argument('event_system_properties', nargs='+', help='System properties of the iot hub')
c.argument('shared_access_policy_name', type=str, help='The name of the share access policy')
with self.argument_context('kusto data-connection wait') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', type=str, help='The name of the Kusto cluster.', id_part='name')
- c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.', id_part=''
- 'child_name_1')
- c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str, help=''
- 'The name of the data connection.', id_part='child_name_2')
+ c.argument('database_name', type=str, help='The name of the database in the Kusto cluster.',
+ id_part='child_name_1')
+ c.argument('data_connection_name', options_list=['--name', '-n', '--data-connection-name'], type=str,
+ help='The name of the data connection.', id_part='child_name_2')
diff --git a/src/kusto/azext_kusto/generated/action.py b/src/kusto/azext_kusto/generated/action.py
index b5ef4ed7add..99c407c99ba 100644
--- a/src/kusto/azext_kusto/generated/action.py
+++ b/src/kusto/azext_kusto/generated/action.py
@@ -37,6 +37,9 @@ def get_action(self, values, option_string): # pylint: disable=no-self-use
d['capacity'] = v[0]
elif kl == 'tier':
d['tier'] = v[0]
+ else:
+ raise CLIError('Unsupported Key {} is provided for parameter sku. All possible keys are: name, '
+ 'capacity, tier'.format(k))
return d
@@ -59,6 +62,9 @@ def get_action(self, values, option_string): # pylint: disable=no-self-use
v = properties[k]
if kl == 'value':
d['value'] = v[0]
+ else:
+ raise CLIError('Unsupported Key {} is provided for parameter trusted_external_tenants. All possible '
+ 'keys are: value'.format(k))
return d
@@ -87,6 +93,9 @@ def get_action(self, values, option_string): # pylint: disable=no-self-use
d['minimum'] = v[0]
elif kl == 'maximum':
d['maximum'] = v[0]
+ else:
+ raise CLIError('Unsupported Key {} is provided for parameter optimized_autoscale. All possible keys '
+ 'are: version, is-enabled, minimum, maximum'.format(k))
return d
@@ -113,6 +122,10 @@ def get_action(self, values, option_string): # pylint: disable=no-self-use
d['engine_public_ip_id'] = v[0]
elif kl == 'data-management-public-ip-id':
d['data_management_public_ip_id'] = v[0]
+ else:
+ raise CLIError('Unsupported Key {} is provided for parameter virtual_network_configuration. All '
+ 'possible keys are: subnet-id, engine-public-ip-id, data-management-public-ip-id'.
+ format(k))
return d
@@ -141,6 +154,9 @@ def get_action(self, values, option_string): # pylint: disable=no-self-use
d['key_vault_uri'] = v[0]
elif kl == 'user-identity':
d['user_identity'] = v[0]
+ else:
+ raise CLIError('Unsupported Key {} is provided for parameter key_vault_properties. All possible keys '
+ 'are: key-name, key-version, key-vault-uri, user-identity'.format(k))
return d
@@ -163,6 +179,9 @@ def get_action(self, values, option_string): # pylint: disable=no-self-use
v = properties[k]
if kl == 'language-extension-name':
d['language_extension_name'] = v[0]
+ else:
+ raise CLIError('Unsupported Key {} is provided for parameter value. All possible keys are: '
+ 'language-extension-name'.format(k))
return d
@@ -189,6 +208,9 @@ def get_action(self, values, option_string): # pylint: disable=no-self-use
d['hot_cache_period'] = v[0]
elif kl == 'location':
d['location'] = v[0]
+ else:
+ raise CLIError('Unsupported Key {} is provided for parameter read_write_database. All possible keys '
+ 'are: soft-delete-period, hot-cache-period, location'.format(k))
d['kind'] = 'ReadWrite'
return d
@@ -214,6 +236,9 @@ def get_action(self, values, option_string): # pylint: disable=no-self-use
d['hot_cache_period'] = v[0]
elif kl == 'location':
d['location'] = v[0]
+ else:
+ raise CLIError('Unsupported Key {} is provided for parameter read_only_following_database. All '
+ 'possible keys are: hot-cache-period, location'.format(k))
d['kind'] = 'ReadOnlyFollowing'
return d
@@ -247,4 +272,7 @@ def get_action(self, values, option_string): # pylint: disable=no-self-use
d['email'] = v[0]
elif kl == 'app-id':
d['app_id'] = v[0]
+ else:
+ raise CLIError('Unsupported Key {} is provided for parameter value. All possible keys are: role, name, '
+ 'type, fqn, email, app-id'.format(k))
return d
diff --git a/src/kusto/azext_kusto/generated/commands.py b/src/kusto/azext_kusto/generated/commands.py
index fd600949355..f8c6e7341c8 100644
--- a/src/kusto/azext_kusto/generated/commands.py
+++ b/src/kusto/azext_kusto/generated/commands.py
@@ -17,9 +17,9 @@ def load_command_table(self, _):
from azext_kusto.generated._client_factory import cf_cluster
kusto_cluster = CliCommandType(
- operations_tmpl='azext_kusto.vendored_sdks.kusto.operations._cluster_operations#ClusterOperations.{}',
+ operations_tmpl='azext_kusto.vendored_sdks.kusto.operations._clusters_operations#ClustersOperations.{}',
client_factory=cf_cluster)
- with self.command_group('kusto cluster', kusto_cluster, client_factory=cf_cluster, is_experimental=True) as g:
+ with self.command_group('kusto cluster', kusto_cluster, client_factory=cf_cluster) as g:
g.custom_command('list', 'kusto_cluster_list')
g.custom_show_command('show', 'kusto_cluster_show')
g.custom_command('create', 'kusto_cluster_create', supports_no_wait=True)
@@ -39,24 +39,25 @@ def load_command_table(self, _):
from azext_kusto.generated._client_factory import cf_cluster_principal_assignment
kusto_cluster_principal_assignment = CliCommandType(
- operations_tmpl='azext_kusto.vendored_sdks.kusto.operations._cluster_principal_assignment_operations#ClusterPri'
- 'ncipalAssignmentOperations.{}',
+ operations_tmpl='azext_kusto.vendored_sdks.kusto.operations._cluster_principal_assignments_operations#ClusterPr'
+ 'incipalAssignmentsOperations.{}',
client_factory=cf_cluster_principal_assignment)
with self.command_group('kusto cluster-principal-assignment', kusto_cluster_principal_assignment,
- client_factory=cf_cluster_principal_assignment, is_experimental=True) as g:
+ client_factory=cf_cluster_principal_assignment) as g:
g.custom_command('list', 'kusto_cluster_principal_assignment_list')
g.custom_show_command('show', 'kusto_cluster_principal_assignment_show')
g.custom_command('create', 'kusto_cluster_principal_assignment_create', supports_no_wait=True)
- g.custom_command('update', 'kusto_cluster_principal_assignment_update', supports_no_wait=True)
+ g.generic_update_command('update', setter_name='begin_create_or_update',
+ custom_func_name='kusto_cluster_principal_assignment_update', supports_no_wait=True)
g.custom_command('delete', 'kusto_cluster_principal_assignment_delete', supports_no_wait=True,
confirmation=True)
g.custom_wait_command('wait', 'kusto_cluster_principal_assignment_show')
from azext_kusto.generated._client_factory import cf_database
kusto_database = CliCommandType(
- operations_tmpl='azext_kusto.vendored_sdks.kusto.operations._database_operations#DatabaseOperations.{}',
+ operations_tmpl='azext_kusto.vendored_sdks.kusto.operations._databases_operations#DatabasesOperations.{}',
client_factory=cf_database)
- with self.command_group('kusto database', kusto_database, client_factory=cf_database, is_experimental=True) as g:
+ with self.command_group('kusto database', kusto_database, client_factory=cf_database) as g:
g.custom_command('list', 'kusto_database_list')
g.custom_show_command('show', 'kusto_database_show')
g.custom_command('create', 'kusto_database_create', supports_no_wait=True)
@@ -69,41 +70,43 @@ def load_command_table(self, _):
from azext_kusto.generated._client_factory import cf_database_principal_assignment
kusto_database_principal_assignment = CliCommandType(
- operations_tmpl='azext_kusto.vendored_sdks.kusto.operations._database_principal_assignment_operations#DatabaseP'
- 'rincipalAssignmentOperations.{}',
+ operations_tmpl='azext_kusto.vendored_sdks.kusto.operations._database_principal_assignments_operations#Database'
+ 'PrincipalAssignmentsOperations.{}',
client_factory=cf_database_principal_assignment)
with self.command_group('kusto database-principal-assignment', kusto_database_principal_assignment,
- client_factory=cf_database_principal_assignment, is_experimental=True) as g:
+ client_factory=cf_database_principal_assignment) as g:
g.custom_command('list', 'kusto_database_principal_assignment_list')
g.custom_show_command('show', 'kusto_database_principal_assignment_show')
g.custom_command('create', 'kusto_database_principal_assignment_create', supports_no_wait=True)
- g.custom_command('update', 'kusto_database_principal_assignment_update', supports_no_wait=True)
+ g.generic_update_command('update', setter_name='begin_create_or_update',
+ custom_func_name='kusto_database_principal_assignment_update', supports_no_wait=True)
g.custom_command('delete', 'kusto_database_principal_assignment_delete', supports_no_wait=True,
confirmation=True)
g.custom_wait_command('wait', 'kusto_database_principal_assignment_show')
from azext_kusto.generated._client_factory import cf_attached_database_configuration
kusto_attached_database_configuration = CliCommandType(
- operations_tmpl='azext_kusto.vendored_sdks.kusto.operations._attached_database_configuration_operations#Attache'
- 'dDatabaseConfigurationOperations.{}',
+ operations_tmpl='azext_kusto.vendored_sdks.kusto.operations._attached_database_configurations_operations#Attach'
+ 'edDatabaseConfigurationsOperations.{}',
client_factory=cf_attached_database_configuration)
with self.command_group('kusto attached-database-configuration', kusto_attached_database_configuration,
- client_factory=cf_attached_database_configuration, is_experimental=True) as g:
+ client_factory=cf_attached_database_configuration) as g:
g.custom_command('list', 'kusto_attached_database_configuration_list')
g.custom_show_command('show', 'kusto_attached_database_configuration_show')
g.custom_command('create', 'kusto_attached_database_configuration_create', supports_no_wait=True)
- g.custom_command('update', 'kusto_attached_database_configuration_update', supports_no_wait=True)
+ g.generic_update_command('update', setter_name='begin_create_or_update',
+ custom_func_name='kusto_attached_database_configuration_update',
+ supports_no_wait=True)
g.custom_command('delete', 'kusto_attached_database_configuration_delete', supports_no_wait=True,
confirmation=True)
g.custom_wait_command('wait', 'kusto_attached_database_configuration_show')
from azext_kusto.generated._client_factory import cf_data_connection
kusto_data_connection = CliCommandType(
- operations_tmpl='azext_kusto.vendored_sdks.kusto.operations._data_connection_operations#DataConnectionOperation'
- 's.{}',
+ operations_tmpl='azext_kusto.vendored_sdks.kusto.operations._data_connections_operations#DataConnectionsOperati'
+ 'ons.{}',
client_factory=cf_data_connection)
- with self.command_group('kusto data-connection', kusto_data_connection, client_factory=cf_data_connection,
- is_experimental=True) as g:
+ with self.command_group('kusto data-connection', kusto_data_connection, client_factory=cf_data_connection) as g:
g.custom_command('list', 'kusto_data_connection_list')
g.custom_show_command('show', 'kusto_data_connection_show')
g.custom_command('event-grid create', 'kusto_data_connection_event_grid_create', supports_no_wait=True)
@@ -120,3 +123,6 @@ def load_command_table(self, _):
g.custom_command('iot-hub data-connection-validation', 'kusto_data_connection_iot_hub_data_connection_validatio'
'n', supports_no_wait=True)
g.custom_wait_command('wait', 'kusto_data_connection_show')
+
+ with self.command_group('kusto', is_experimental=True):
+ pass
diff --git a/src/kusto/azext_kusto/generated/custom.py b/src/kusto/azext_kusto/generated/custom.py
index c415f8f5719..62e042fe201 100644
--- a/src/kusto/azext_kusto/generated/custom.py
+++ b/src/kusto/azext_kusto/generated/custom.py
@@ -8,6 +8,7 @@
# regenerated.
# --------------------------------------------------------------------------
# pylint: disable=too-many-lines
+# pylint: disable=unused-argument
from knack.util import CLIError
from azure.cli.core.util import sdk_no_wait
@@ -43,8 +44,8 @@ def kusto_cluster_create(client,
enable_purge=None,
enable_double_encryption=None,
engine_type=None,
- identity_type=None,
- identity_user_assigned_identities=None,
+ type_=None,
+ user_assigned_identities=None,
no_wait=False):
if enable_streaming_ingest is None:
enable_streaming_ingest = False
@@ -52,25 +53,28 @@ def kusto_cluster_create(client,
enable_purge = False
if enable_double_encryption is None:
enable_double_encryption = False
+ parameters = {}
+ parameters['tags'] = tags
+ parameters['location'] = location
+ parameters['sku'] = sku
+ parameters['zones'] = zones
+ parameters['trusted_external_tenants'] = trusted_external_tenants
+ parameters['optimized_autoscale'] = optimized_autoscale
+ parameters['enable_disk_encryption'] = enable_disk_encryption
+ parameters['enable_streaming_ingest'] = False if enable_streaming_ingest is None else enable_streaming_ingest
+ parameters['virtual_network_configuration'] = virtual_network_configuration
+ parameters['key_vault_properties'] = key_vault_properties
+ parameters['enable_purge'] = False if enable_purge is None else enable_purge
+ parameters['enable_double_encryption'] = False if enable_double_encryption is None else enable_double_encryption
+ parameters['engine_type'] = engine_type
+ parameters['identity'] = {}
+ parameters['identity']['type'] = type_
+ parameters['identity']['user_assigned_identities'] = user_assigned_identities
return sdk_no_wait(no_wait,
client.begin_create_or_update,
resource_group_name=resource_group_name,
cluster_name=cluster_name,
- tags=tags,
- location=location,
- sku=sku,
- zones=zones,
- trusted_external_tenants=trusted_external_tenants,
- optimized_autoscale=optimized_autoscale,
- enable_disk_encryption=enable_disk_encryption,
- enable_streaming_ingest=enable_streaming_ingest,
- virtual_network_configuration=virtual_network_configuration,
- key_vault_properties=key_vault_properties,
- enable_purge=enable_purge,
- enable_double_encryption=enable_double_encryption,
- engine_type=engine_type,
- type=identity_type,
- user_assigned_identities=identity_user_assigned_identities)
+ parameters=parameters)
def kusto_cluster_update(client,
@@ -88,8 +92,8 @@ def kusto_cluster_update(client,
enable_purge=None,
enable_double_encryption=None,
engine_type=None,
- identity_type=None,
- identity_user_assigned_identities=None,
+ type_=None,
+ user_assigned_identities=None,
no_wait=False):
if enable_streaming_ingest is None:
enable_streaming_ingest = False
@@ -97,24 +101,27 @@ def kusto_cluster_update(client,
enable_purge = False
if enable_double_encryption is None:
enable_double_encryption = False
+ parameters = {}
+ parameters['tags'] = tags
+ parameters['location'] = location
+ parameters['sku'] = sku
+ parameters['trusted_external_tenants'] = trusted_external_tenants
+ parameters['optimized_autoscale'] = optimized_autoscale
+ parameters['enable_disk_encryption'] = enable_disk_encryption
+ parameters['enable_streaming_ingest'] = False if enable_streaming_ingest is None else enable_streaming_ingest
+ parameters['virtual_network_configuration'] = virtual_network_configuration
+ parameters['key_vault_properties'] = key_vault_properties
+ parameters['enable_purge'] = False if enable_purge is None else enable_purge
+ parameters['enable_double_encryption'] = False if enable_double_encryption is None else enable_double_encryption
+ parameters['engine_type'] = engine_type
+ parameters['identity'] = {}
+ parameters['identity']['type'] = type_
+ parameters['identity']['user_assigned_identities'] = user_assigned_identities
return sdk_no_wait(no_wait,
client.begin_update,
resource_group_name=resource_group_name,
cluster_name=cluster_name,
- tags=tags,
- location=location,
- sku=sku,
- trusted_external_tenants=trusted_external_tenants,
- optimized_autoscale=optimized_autoscale,
- enable_disk_encryption=enable_disk_encryption,
- enable_streaming_ingest=enable_streaming_ingest,
- virtual_network_configuration=virtual_network_configuration,
- key_vault_properties=key_vault_properties,
- enable_purge=enable_purge,
- enable_double_encryption=enable_double_encryption,
- engine_type=engine_type,
- type=identity_type,
- user_assigned_identities=identity_user_assigned_identities)
+ parameters=parameters)
def kusto_cluster_delete(client,
@@ -132,11 +139,13 @@ def kusto_cluster_add_language_extension(client,
cluster_name,
value=None,
no_wait=False):
+ language_extensions_to_add = {}
+ language_extensions_to_add['value'] = value
return sdk_no_wait(no_wait,
- client.begin_add_language_extension,
+ client.begin_add_language_extensions,
resource_group_name=resource_group_name,
cluster_name=cluster_name,
- value=value)
+ language_extensions_to_add=language_extensions_to_add)
def kusto_cluster_detach_follower_database(client,
@@ -145,12 +154,14 @@ def kusto_cluster_detach_follower_database(client,
cluster_resource_id,
attached_database_configuration_name,
no_wait=False):
+ follower_database_to_remove = {}
+ follower_database_to_remove['cluster_resource_id'] = cluster_resource_id
+ follower_database_to_remove['attached_database_configuration_name'] = attached_database_configuration_name
return sdk_no_wait(no_wait,
- client.begin_detach_follower_database,
+ client.begin_detach_follower_databases,
resource_group_name=resource_group_name,
cluster_name=cluster_name,
- cluster_resource_id=cluster_resource_id,
- attached_database_configuration_name=attached_database_configuration_name)
+ follower_database_to_remove=follower_database_to_remove)
def kusto_cluster_diagnose_virtual_network(client,
@@ -166,24 +177,24 @@ def kusto_cluster_diagnose_virtual_network(client,
def kusto_cluster_list_follower_database(client,
resource_group_name,
cluster_name):
- return client.list_follower_database(resource_group_name=resource_group_name,
- cluster_name=cluster_name)
+ return client.list_follower_databases(resource_group_name=resource_group_name,
+ cluster_name=cluster_name)
def kusto_cluster_list_language_extension(client,
resource_group_name,
cluster_name):
- return client.list_language_extension(resource_group_name=resource_group_name,
- cluster_name=cluster_name)
+ return client.list_language_extensions(resource_group_name=resource_group_name,
+ cluster_name=cluster_name)
def kusto_cluster_list_sku(client,
resource_group_name=None,
cluster_name=None):
if resource_group_name and cluster_name is not None:
- return client.list_sku_by_resource(resource_group_name=resource_group_name,
- cluster_name=cluster_name)
- return client.list_sku()
+ return client.list_skus_by_resource(resource_group_name=resource_group_name,
+ cluster_name=cluster_name)
+ return client.list_skus()
def kusto_cluster_remove_language_extension(client,
@@ -191,11 +202,13 @@ def kusto_cluster_remove_language_extension(client,
cluster_name,
value=None,
no_wait=False):
+ language_extensions_to_remove = {}
+ language_extensions_to_remove['value'] = value
return sdk_no_wait(no_wait,
- client.begin_remove_language_extension,
+ client.begin_remove_language_extensions,
resource_group_name=resource_group_name,
cluster_name=cluster_name,
- value=value)
+ language_extensions_to_remove=language_extensions_to_remove)
def kusto_cluster_start(client,
@@ -243,18 +256,20 @@ def kusto_cluster_principal_assignment_create(client,
tenant_id=None,
principal_type=None,
no_wait=False):
+ parameters = {}
+ parameters['principal_id'] = principal_id
+ parameters['role'] = role
+ parameters['tenant_id'] = tenant_id
+ parameters['principal_type'] = principal_type
return sdk_no_wait(no_wait,
client.begin_create_or_update,
resource_group_name=resource_group_name,
cluster_name=cluster_name,
principal_assignment_name=principal_assignment_name,
- principal_id=principal_id,
- role=role,
- tenant_id=tenant_id,
- principal_type=principal_type)
+ parameters=parameters)
-def kusto_cluster_principal_assignment_update(client,
+def kusto_cluster_principal_assignment_update(instance,
resource_group_name,
cluster_name,
principal_assignment_name,
@@ -263,15 +278,15 @@ def kusto_cluster_principal_assignment_update(client,
tenant_id=None,
principal_type=None,
no_wait=False):
- return sdk_no_wait(no_wait,
- client.begin_create_or_update,
- resource_group_name=resource_group_name,
- cluster_name=cluster_name,
- principal_assignment_name=principal_assignment_name,
- principal_id=principal_id,
- role=role,
- tenant_id=tenant_id,
- principal_type=principal_type)
+ if principal_id is not None:
+ instance.principal_id = principal_id
+ if role is not None:
+ instance.role = role
+ if tenant_id is not None:
+ instance.tenant_id = tenant_id
+ if principal_type is not None:
+ instance.principal_type = principal_type
+ return instance
def kusto_cluster_principal_assignment_delete(client,
@@ -371,19 +386,21 @@ def kusto_database_add_principal(client,
cluster_name,
database_name,
value=None):
- return client.add_principal(resource_group_name=resource_group_name,
- cluster_name=cluster_name,
- database_name=database_name,
- value=value)
+ database_principals_to_add = {}
+ database_principals_to_add['value'] = value
+ return client.add_principals(resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ database_name=database_name,
+ database_principals_to_add=database_principals_to_add)
def kusto_database_list_principal(client,
resource_group_name,
cluster_name,
database_name):
- return client.list_principal(resource_group_name=resource_group_name,
- cluster_name=cluster_name,
- database_name=database_name)
+ return client.list_principals(resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ database_name=database_name)
def kusto_database_remove_principal(client,
@@ -391,10 +408,12 @@ def kusto_database_remove_principal(client,
cluster_name,
database_name,
value=None):
- return client.remove_principal(resource_group_name=resource_group_name,
- cluster_name=cluster_name,
- database_name=database_name,
- value=value)
+ database_principals_to_remove = {}
+ database_principals_to_remove['value'] = value
+ return client.remove_principals(resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ database_name=database_name,
+ database_principals_to_remove=database_principals_to_remove)
def kusto_database_principal_assignment_list(client,
@@ -427,19 +446,21 @@ def kusto_database_principal_assignment_create(client,
tenant_id=None,
principal_type=None,
no_wait=False):
+ parameters = {}
+ parameters['principal_id'] = principal_id
+ parameters['role'] = role
+ parameters['tenant_id'] = tenant_id
+ parameters['principal_type'] = principal_type
return sdk_no_wait(no_wait,
client.begin_create_or_update,
resource_group_name=resource_group_name,
cluster_name=cluster_name,
database_name=database_name,
principal_assignment_name=principal_assignment_name,
- principal_id=principal_id,
- role=role,
- tenant_id=tenant_id,
- principal_type=principal_type)
+ parameters=parameters)
-def kusto_database_principal_assignment_update(client,
+def kusto_database_principal_assignment_update(instance,
resource_group_name,
cluster_name,
database_name,
@@ -449,16 +470,15 @@ def kusto_database_principal_assignment_update(client,
tenant_id=None,
principal_type=None,
no_wait=False):
- return sdk_no_wait(no_wait,
- client.begin_create_or_update,
- resource_group_name=resource_group_name,
- cluster_name=cluster_name,
- database_name=database_name,
- principal_assignment_name=principal_assignment_name,
- principal_id=principal_id,
- role=role,
- tenant_id=tenant_id,
- principal_type=principal_type)
+ if principal_id is not None:
+ instance.principal_id = principal_id
+ if role is not None:
+ instance.role = role
+ if tenant_id is not None:
+ instance.tenant_id = tenant_id
+ if principal_type is not None:
+ instance.principal_type = principal_type
+ return instance
def kusto_database_principal_assignment_delete(client,
@@ -500,18 +520,20 @@ def kusto_attached_database_configuration_create(client,
cluster_resource_id=None,
default_principals_modification_kind=None,
no_wait=False):
+ parameters = {}
+ parameters['location'] = location
+ parameters['database_name'] = database_name
+ parameters['cluster_resource_id'] = cluster_resource_id
+ parameters['default_principals_modification_kind'] = default_principals_modification_kind
return sdk_no_wait(no_wait,
client.begin_create_or_update,
resource_group_name=resource_group_name,
cluster_name=cluster_name,
attached_database_configuration_name=attached_database_configuration_name,
- location=location,
- database_name=database_name,
- cluster_resource_id=cluster_resource_id,
- default_principals_modification_kind=default_principals_modification_kind)
+ parameters=parameters)
-def kusto_attached_database_configuration_update(client,
+def kusto_attached_database_configuration_update(instance,
resource_group_name,
cluster_name,
attached_database_configuration_name,
@@ -520,15 +542,15 @@ def kusto_attached_database_configuration_update(client,
cluster_resource_id=None,
default_principals_modification_kind=None,
no_wait=False):
- return sdk_no_wait(no_wait,
- client.begin_create_or_update,
- resource_group_name=resource_group_name,
- cluster_name=cluster_name,
- attached_database_configuration_name=attached_database_configuration_name,
- location=location,
- database_name=database_name,
- cluster_resource_id=cluster_resource_id,
- default_principals_modification_kind=default_principals_modification_kind)
+ if location is not None:
+ instance.location = location
+ if database_name is not None:
+ instance.database_name = database_name
+ if cluster_resource_id is not None:
+ instance.cluster_resource_id = cluster_resource_id
+ if default_principals_modification_kind is not None:
+ instance.default_principals_modification_kind = default_principals_modification_kind
+ return instance
def kusto_attached_database_configuration_delete(client,
@@ -794,24 +816,25 @@ def kusto_data_connection_event_grid_data_connection_validation(client,
ignore_first_record=None,
blob_storage_event_type=None,
no_wait=False):
- properties = {}
- properties['location'] = location
- properties['kind'] = 'EventGrid'
- properties['storage_account_resource_id'] = storage_account_resource_id
- properties['event_hub_resource_id'] = event_hub_resource_id
- properties['consumer_group'] = consumer_group
- properties['table_name'] = table_name
- properties['mapping_rule_name'] = mapping_rule_name
- properties['data_format'] = data_format
- properties['ignore_first_record'] = ignore_first_record
- properties['blob_storage_event_type'] = blob_storage_event_type
+ parameters = {}
+ parameters['data_connection_name'] = data_connection_name
+ parameters['properties'] = {}
+ parameters['properties']['location'] = location
+ parameters['properties']['kind'] = 'EventGrid'
+ parameters['properties']['storage_account_resource_id'] = storage_account_resource_id
+ parameters['properties']['event_hub_resource_id'] = event_hub_resource_id
+ parameters['properties']['consumer_group'] = consumer_group
+ parameters['properties']['table_name'] = table_name
+ parameters['properties']['mapping_rule_name'] = mapping_rule_name
+ parameters['properties']['data_format'] = data_format
+ parameters['properties']['ignore_first_record'] = ignore_first_record
+ parameters['properties']['blob_storage_event_type'] = blob_storage_event_type
return sdk_no_wait(no_wait,
client.begin_data_connection_validation,
resource_group_name=resource_group_name,
cluster_name=cluster_name,
database_name=database_name,
- data_connection_name=data_connection_name,
- properties=properties)
+ parameters=parameters)
def kusto_data_connection_event_hub_data_connection_validation(client,
@@ -828,23 +851,24 @@ def kusto_data_connection_event_hub_data_connection_validation(client,
event_system_properties=None,
compression=None,
no_wait=False):
- properties = {}
- properties['location'] = location
- properties['kind'] = 'EventHub'
- properties['event_hub_resource_id'] = event_hub_resource_id
- properties['consumer_group'] = consumer_group
- properties['table_name'] = table_name
- properties['mapping_rule_name'] = mapping_rule_name
- properties['data_format'] = data_format
- properties['event_system_properties'] = event_system_properties
- properties['compression'] = compression
+ parameters = {}
+ parameters['data_connection_name'] = data_connection_name
+ parameters['properties'] = {}
+ parameters['properties']['location'] = location
+ parameters['properties']['kind'] = 'EventHub'
+ parameters['properties']['event_hub_resource_id'] = event_hub_resource_id
+ parameters['properties']['consumer_group'] = consumer_group
+ parameters['properties']['table_name'] = table_name
+ parameters['properties']['mapping_rule_name'] = mapping_rule_name
+ parameters['properties']['data_format'] = data_format
+ parameters['properties']['event_system_properties'] = event_system_properties
+ parameters['properties']['compression'] = compression
return sdk_no_wait(no_wait,
client.begin_data_connection_validation,
resource_group_name=resource_group_name,
cluster_name=cluster_name,
database_name=database_name,
- data_connection_name=data_connection_name,
- properties=properties)
+ parameters=parameters)
def kusto_data_connection_iot_hub_data_connection_validation(client,
@@ -861,20 +885,21 @@ def kusto_data_connection_iot_hub_data_connection_validation(client,
event_system_properties=None,
shared_access_policy_name=None,
no_wait=False):
- properties = {}
- properties['location'] = location
- properties['kind'] = 'IotHub'
- properties['iot_hub_resource_id'] = iot_hub_resource_id
- properties['consumer_group'] = consumer_group
- properties['table_name'] = table_name
- properties['mapping_rule_name'] = mapping_rule_name
- properties['data_format'] = data_format
- properties['event_system_properties'] = event_system_properties
- properties['shared_access_policy_name'] = shared_access_policy_name
+ parameters = {}
+ parameters['data_connection_name'] = data_connection_name
+ parameters['properties'] = {}
+ parameters['properties']['location'] = location
+ parameters['properties']['kind'] = 'IotHub'
+ parameters['properties']['iot_hub_resource_id'] = iot_hub_resource_id
+ parameters['properties']['consumer_group'] = consumer_group
+ parameters['properties']['table_name'] = table_name
+ parameters['properties']['mapping_rule_name'] = mapping_rule_name
+ parameters['properties']['data_format'] = data_format
+ parameters['properties']['event_system_properties'] = event_system_properties
+ parameters['properties']['shared_access_policy_name'] = shared_access_policy_name
return sdk_no_wait(no_wait,
client.begin_data_connection_validation,
resource_group_name=resource_group_name,
cluster_name=cluster_name,
database_name=database_name,
- data_connection_name=data_connection_name,
- properties=properties)
+ parameters=parameters)
diff --git a/src/kusto/azext_kusto/tests/__init__.py b/src/kusto/azext_kusto/tests/__init__.py
index 50e0627daff..70488e93851 100644
--- a/src/kusto/azext_kusto/tests/__init__.py
+++ b/src/kusto/azext_kusto/tests/__init__.py
@@ -31,8 +31,8 @@
def try_manual(func):
def import_manual_function(origin_func):
from importlib import import_module
- decorated_path = inspect.getfile(origin_func)
- module_path = __path__[0]
+ decorated_path = inspect.getfile(origin_func).lower()
+ module_path = __path__[0].lower()
if not decorated_path.startswith(module_path):
raise Exception("Decorator can only be used in submodules!")
manual_path = os.path.join(
@@ -46,7 +46,6 @@ def import_manual_function(origin_func):
def get_func_to_call():
func_to_call = func
try:
- func_to_call = import_manual_function(func)
func_to_call = import_manual_function(func)
logger.info("Found manual override for %s(...)", func.__name__)
except (ImportError, AttributeError):
@@ -66,6 +65,9 @@ def wrapper(*args, **kwargs):
ret = func_to_call(*args, **kwargs)
except (AssertionError, AzureError, CliTestError, CliExecutionError, SystemExit,
JMESPathCheckAssertionError) as e:
+ use_exception_cache = os.getenv("TEST_EXCEPTION_CACHE")
+ if use_exception_cache is None or use_exception_cache.lower() != "true":
+ raise
test_map[func.__name__]["end_dt"] = dt.datetime.utcnow()
test_map[func.__name__]["result"] = FAILED
test_map[func.__name__]["error_message"] = str(e).replace("\r\n", " ").replace("\n", " ")[:500]
diff --git a/src/kusto/azext_kusto/tests/latest/example_steps.py b/src/kusto/azext_kusto/tests/latest/example_steps.py
new file mode 100644
index 00000000000..3fad32bd08f
--- /dev/null
+++ b/src/kusto/azext_kusto/tests/latest/example_steps.py
@@ -0,0 +1,563 @@
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+
+from .. import try_manual
+
+
+# EXAMPLE: /AttachedDatabaseConfigurations/put/AttachedDatabaseConfigurationsCreateOrUpdate
+@try_manual
+def step_attached_database_configuration_create(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto attached-database-configuration create '
+ '--name "{myAttachedDatabaseConfiguration2}" '
+ '--cluster-name "{myCluster}" '
+ '--location "westus" '
+ '--cluster-resource-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Kusto/Clu'
+ 'sters/{myCluster3}" '
+ '--database-name "kustodatabase" '
+ '--default-principals-modification-kind "Union" '
+ '--resource-group "{rg}"',
+ checks=[])
+ test.cmd('az kusto attached-database-configuration wait --created '
+ '--name "{myAttachedDatabaseConfiguration2}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /AttachedDatabaseConfigurations/get/AttachedDatabaseConfigurationsGet
+@try_manual
+def step_attached_database_configuration_show(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto attached-database-configuration show '
+ '--name "{myAttachedDatabaseConfiguration2}" '
+ '--cluster-name "{myCluster}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /AttachedDatabaseConfigurations/get/KustoAttachedDatabaseConfigurationsListByCluster
+@try_manual
+def step_attached_database_configuration_list(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto attached-database-configuration list '
+ '--cluster-name "{myCluster}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Clusters/put/KustoClustersCreateOrUpdate
+@try_manual
+def step_cluster_create(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster create '
+ '--name "{myCluster}" '
+ '--type "SystemAssigned" '
+ '--location "westus" '
+ '--enable-double-encryption false '
+ '--enable-purge true '
+ '--enable-streaming-ingest true '
+ '--sku name="Standard_L8s" capacity=2 tier="Standard" '
+ '--resource-group "{rg}"',
+ checks=[])
+ test.cmd('az kusto cluster wait --created '
+ '--name "{myCluster}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Clusters/get/KustoClustersGet
+@try_manual
+def step_cluster_show(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster show '
+ '--name "{myCluster}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Clusters/get/KustoClustersList
+@try_manual
+def step_cluster_list(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster list '
+ '-g ""',
+ checks=checks)
+
+
+# EXAMPLE: /Clusters/get/KustoClustersListByResourceGroup
+@try_manual
+def step_cluster_list2(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster list '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Clusters/get/KustoClustersListResourceSkus
+@try_manual
+def step_cluster_list_sku(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster list-sku '
+ '--name "{myCluster}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Clusters/get/KustoClustersListSkus
+@try_manual
+def step_cluster_list_sku2(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster list-sku '
+ '-g ""',
+ checks=checks)
+
+
+# EXAMPLE: /Clusters/patch/KustoClustersUpdate
+@try_manual
+def step_cluster_update(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster update '
+ '--name "{myCluster}" '
+ '--type "SystemAssigned" '
+ '--location "westus" '
+ '--enable-purge true '
+ '--enable-streaming-ingest true '
+ '--engine-type "V2" '
+ '--key-vault-properties key-name="keyName" key-vault-uri="https://dummy.keyvault.com" '
+ 'key-version="keyVersion" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Clusters/post/KustoClusterAddLanguageExtensions
+@try_manual
+def step_cluster_add_language_extension(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster add-language-extension '
+ '--name "{myCluster}" '
+ '--value language-extension-name="PYTHON" '
+ '--value language-extension-name="R" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Clusters/post/KustoClusterDetachFollowerDatabases
+@try_manual
+def step_cluster_detach_follower_database(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster detach-follower-database '
+ '--name "{myCluster}" '
+ '--attached-database-configuration-name "{myAttachedDatabaseConfiguration}" '
+ '--cluster-resource-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Kusto/clu'
+ 'sters/{myCluster2}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Clusters/post/KustoClusterDiagnoseVirtualNetwork
+@try_manual
+def step_cluster_diagnose_virtual_network(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster diagnose-virtual-network '
+ '--name "{myCluster}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Clusters/post/KustoClusterListFollowerDatabases
+@try_manual
+def step_cluster_list_follower_database(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster list-follower-database '
+ '--name "{myCluster}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Clusters/post/KustoClusterListLanguageExtensions
+@try_manual
+def step_cluster_list_language_extension(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster list-language-extension '
+ '--name "{myCluster}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Clusters/post/KustoClusterRemoveLanguageExtensions
+@try_manual
+def step_cluster_remove_language_extension(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster remove-language-extension '
+ '--name "{myCluster}" '
+ '--value language-extension-name="PYTHON" '
+ '--value language-extension-name="R" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Clusters/post/KustoClustersStart
+@try_manual
+def step_cluster_start(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster start '
+ '--name "{myCluster}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Clusters/post/KustoClustersStop
+@try_manual
+def step_cluster_stop(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster stop '
+ '--name "{myCluster}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /ClusterPrincipalAssignments/put/KustoClusterPrincipalAssignmentsCreateOrUpdate
+@try_manual
+def step_cluster_principal_assignment_create(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster-principal-assignment create '
+ '--cluster-name "{myCluster}" '
+ '--principal-id "87654321-1234-1234-1234-123456789123" '
+ '--principal-type "App" '
+ '--role "AllDatabasesAdmin" '
+ '--tenant-id "12345678-1234-1234-1234-123456789123" '
+ '--principal-assignment-name "kustoprincipal1" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /ClusterPrincipalAssignments/get/KustoClusterPrincipalAssignmentsGet
+@try_manual
+def step_cluster_principal_assignment_show(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster-principal-assignment show '
+ '--cluster-name "{myCluster}" '
+ '--principal-assignment-name "kustoprincipal1" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /ClusterPrincipalAssignments/get/KustoPrincipalAssignmentsList
+@try_manual
+def step_cluster_principal_assignment_list(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster-principal-assignment list '
+ '--cluster-name "{myCluster}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /DatabasePrincipalAssignments/put/KustoDatabasePrincipalAssignmentsCreateOrUpdate
+@try_manual
+def step_database_principal_assignment_create(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto database-principal-assignment create '
+ '--cluster-name "{myCluster}" '
+ '--database-name "Kustodatabase8" '
+ '--principal-id "87654321-1234-1234-1234-123456789123" '
+ '--principal-type "App" '
+ '--role "Admin" '
+ '--tenant-id "12345678-1234-1234-1234-123456789123" '
+ '--principal-assignment-name "kustoprincipal1" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /DatabasePrincipalAssignments/get/KustoDatabasePrincipalAssignmentsGet
+@try_manual
+def step_database_principal_assignment_show(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto database-principal-assignment show '
+ '--cluster-name "{myCluster}" '
+ '--database-name "Kustodatabase8" '
+ '--principal-assignment-name "kustoprincipal1" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /DatabasePrincipalAssignments/get/KustoPrincipalAssignmentsList
+@try_manual
+def step_database_principal_assignment_list(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto database-principal-assignment list '
+ '--cluster-name "{myCluster}" '
+ '--database-name "Kustodatabase8" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /DatabasePrincipalAssignments/delete/KustoDatabasePrincipalAssignmentsDelete
+@try_manual
+def step_database_principal_assignment_delete(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto database-principal-assignment delete -y '
+ '--cluster-name "{myCluster}" '
+ '--database-name "Kustodatabase8" '
+ '--principal-assignment-name "kustoprincipal1" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Databases/put/KustoDatabasesCreateOrUpdate
+@try_manual
+def step_database_create(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto database create '
+ '--cluster-name "{myCluster}" '
+ '--database-name "KustoDatabase8" '
+ '--parameters "{{\\"location\\":\\"westus\\",\\"properties\\":{{\\"softDeletePeriod\\":\\"P1D\\"}}}}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Databases/get/KustoDatabasesGet
+@try_manual
+def step_database_show(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto database show '
+ '--cluster-name "{myCluster}" '
+ '--database-name "KustoDatabase8" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Databases/get/KustoDatabasesListByCluster
+@try_manual
+def step_database_list(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto database list '
+ '--cluster-name "{myCluster}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Databases/patch/KustoDatabasesUpdate
+@try_manual
+def step_database_update(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto database update '
+ '--cluster-name "{myCluster}" '
+ '--database-name "KustoDatabase8" '
+ '--parameters "{{\\"properties\\":{{\\"softDeletePeriod\\":\\"P1D\\"}}}}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Databases/post/KustoDatabaseAddPrincipals
+@try_manual
+def step_database_add_principal(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto database add-principal '
+ '--cluster-name "{myCluster}" '
+ '--database-name "KustoDatabase8" '
+ '--value name="Some User" type="User" app-id="" email="user@microsoft.com" fqn="aaduser role="Admin" '
+ '--value name="Kusto" type="Group" app-id="" email="kusto@microsoft.com" fqn="aadgroup role="Viewer" '
+ '--value name="SomeApp" type="App" app-id="some_guid_app_id" email="" fqn="aadapp role="Admin" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Databases/post/KustoDatabaseListPrincipals
+@try_manual
+def step_database_list_principal(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto database list-principal '
+ '--cluster-name "{myCluster}" '
+ '--database-name "KustoDatabase8" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Databases/post/KustoDatabaseRemovePrincipals
+@try_manual
+def step_database_remove_principal(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto database remove-principal '
+ '--cluster-name "{myCluster}" '
+ '--database-name "KustoDatabase8" '
+ '--value name="Some User" type="User" app-id="" email="user@microsoft.com" fqn="aaduser role="Admin" '
+ '--value name="Kusto" type="Group" app-id="" email="kusto@microsoft.com" fqn="aadgroup role="Viewer" '
+ '--value name="SomeApp" type="App" app-id="some_guid_app_id" email="" fqn="aadapp role="Admin" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Databases/delete/KustoDatabasesDelete
+@try_manual
+def step_database_delete(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto database delete -y '
+ '--cluster-name "{myCluster}" '
+ '--database-name "KustoDatabase8" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /DataConnections/put/KustoDataConnectionsCreateOrUpdate
+@try_manual
+def step_data_connection_event_hub_create(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto data-connection event-hub create '
+ '--cluster-name "{myCluster}" '
+ '--name "{myDataConnection}" '
+ '--database-name "KustoDatabase8" '
+ '--location "westus" '
+ '--consumer-group "testConsumerGroup1" '
+ '--event-hub-resource-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.EventHu'
+ 'b/namespaces/eventhubTestns1/eventhubs/eventhubTest1" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /DataConnections/get/KustoDatabasesListByCluster
+@try_manual
+def step_data_connection_list(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto data-connection list '
+ '--cluster-name "{myCluster}" '
+ '--database-name "KustoDatabase8" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /DataConnections/get/KustoDataConnectionsGet
+@try_manual
+def step_data_connection_show(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto data-connection show '
+ '--cluster-name "{myCluster}" '
+ '--name "{myDataConnection}" '
+ '--database-name "KustoDatabase8" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /DataConnections/patch/KustoDataConnectionsUpdate
+@try_manual
+def step_data_connection_event_hub_update(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto data-connection event-hub update '
+ '--cluster-name "{myCluster}" '
+ '--name "{myDataConnection}" '
+ '--database-name "KustoDatabase8" '
+ '--location "westus" '
+ '--consumer-group "testConsumerGroup1" '
+ '--event-hub-resource-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.EventHu'
+ 'b/namespaces/eventhubTestns1/eventhubs/eventhubTest1" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /DataConnections/post/KustoDataConnectionValidation
+@try_manual
+def step_data_connection_event(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto data-connection event-hub data-connection-validation '
+ '--cluster-name "{myCluster}" '
+ '--database-name "KustoDatabase8" '
+ '--name "{myDataConnection}" '
+ '--consumer-group "testConsumerGroup1" '
+ '--event-hub-resource-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.EventHu'
+ 'b/namespaces/eventhubTestns1/eventhubs/eventhubTest1" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /DataConnections/delete/KustoDataConnectionsDelete
+@try_manual
+def step_data_connection_delete(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto data-connection delete -y '
+ '--cluster-name "{myCluster}" '
+ '--name "{myDataConnection2}" '
+ '--database-name "KustoDatabase8" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /Clusters/delete/KustoClustersDelete
+@try_manual
+def step_cluster_delete(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster delete -y '
+ '--name "{myCluster}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /AttachedDatabaseConfigurations/delete/AttachedDatabaseConfigurationsDelete
+@try_manual
+def step_attached_database_configuration_delete(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto attached-database-configuration delete -y '
+ '--name "{myAttachedDatabaseConfiguration2}" '
+ '--cluster-name "{myCluster}" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
+
+# EXAMPLE: /ClusterPrincipalAssignments/delete/KustoClusterPrincipalAssignmentsDelete
+@try_manual
+def step_cluster_principal_assignment_delete(test, rg, checks=None):
+ if checks is None:
+ checks = []
+ test.cmd('az kusto cluster-principal-assignment delete -y '
+ '--cluster-name "{myCluster}" '
+ '--principal-assignment-name "kustoprincipal1" '
+ '--resource-group "{rg}"',
+ checks=checks)
+
diff --git a/src/kusto/azext_kusto/tests/latest/test_kusto_scenario.py b/src/kusto/azext_kusto/tests/latest/test_kusto_scenario.py
index b4fe6edbdb1..1e1b63a44d2 100644
--- a/src/kusto/azext_kusto/tests/latest/test_kusto_scenario.py
+++ b/src/kusto/azext_kusto/tests/latest/test_kusto_scenario.py
@@ -10,559 +10,164 @@
import os
from azure.cli.testsdk import ScenarioTest
-from .. import try_manual, raise_if, calc_coverage
from azure.cli.testsdk import ResourceGroupPreparer
+from .example_steps import step_cluster_create
+from .example_steps import step_database_create
+from .example_steps import step_data_connection_event_hub_create
+from .example_steps import step_attached_database_configuration_create
+from .example_steps import step_attached_database_configuration_show
+from .example_steps import step_data_connection_show
+from .example_steps import step_database_list
+from .example_steps import step_attached_database_configuration_list
+from .example_steps import step_database_show
+from .example_steps import step_cluster_list_sku
+from .example_steps import step_cluster_show
+from .example_steps import step_cluster_list2
+from .example_steps import step_cluster_list
+from .example_steps import step_cluster_list_sku2
+from .example_steps import step_data_connection_event_hub_update
+from .example_steps import step_data_connection_event
+from .example_steps import step_database_remove_principal
+from .example_steps import step_database_list_principal
+from .example_steps import step_database_add_principal
+from .example_steps import step_database_update
+from .example_steps import step_cluster_detach_follower_database
+from .example_steps import step_cluster_list_follower_database
+from .example_steps import step_cluster_start
+from .example_steps import step_cluster_stop
+from .example_steps import step_cluster_update
+from .example_steps import step_attached_database_configuration_delete
+from .example_steps import step_data_connection_delete
+from .example_steps import step_database_delete
+from .example_steps import step_cluster_delete
+from .example_steps import step_database_principal_assignment_show
+from .example_steps import step_database_principal_assignment_create
+from .example_steps import step_database_principal_assignment_delete
+from .example_steps import step_cluster_principal_assignment_show
+from .example_steps import step_cluster_principal_assignment_create
+from .example_steps import step_cluster_principal_assignment_delete
+from .. import (
+ try_manual,
+ raise_if,
+ calc_coverage
+)
TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..'))
-# Env setup
+# Env setup_scenario
@try_manual
-def setup(test, rg):
+def setup_scenario(test, rg):
pass
-# EXAMPLE: KustoClustersCreateOrUpdate
+# Env cleanup_scenario
@try_manual
-def step_kustoclusterscreateorupdate(test, rg):
- test.cmd('az kusto cluster create '
- '--name "{myCluster}" '
- '--identity-type "SystemAssigned" '
- '--location "westus" '
- '--enable-double-encryption false '
- '--enable-purge true '
- '--enable-streaming-ingest true '
- '--sku name="Standard_L8s" capacity=2 tier="Standard" '
- '--resource-group "{rg}"',
- checks=[
- test.check("name", "{myCluster}", case_sensitive=False),
- test.check("identity.type", "SystemAssigned", case_sensitive=False),
- test.check("location", "westus", case_sensitive=False),
- test.check("enableDoubleEncryption", False),
- test.check("enablePurge", True),
- test.check("enableStreamingIngest", True),
- test.check("sku.name", "Standard_L8s", case_sensitive=False),
- test.check("sku.capacity", 2),
- test.check("sku.tier", "Standard", case_sensitive=False),
- ])
- test.cmd('az kusto cluster wait --created '
- '--name "{myCluster}" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoDatabasesCreateOrUpdate
-@try_manual
-def step_kustodatabasescreateorupdate(test, rg):
- test.cmd('az kusto database create '
- '--cluster-name "{myCluster}" '
- '--database-name "KustoDatabase8" '
- '--parameters "{{\\"location\\":\\"westus\\",\\"properties\\":{{\\"softDeletePeriod\\":\\"P1D\\"}}}}" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoDataConnectionsCreateOrUpdate
-@try_manual
-def step_kustodataconnectionscreateorupdate(test, rg):
- test.cmd('az kusto data-connection event-hub create '
- '--cluster-name "{myCluster}" '
- '--name "{myDataConnection}" '
- '--database-name "KustoDatabase8" '
- '--location "westus" '
- '--consumer-group "testConsumerGroup1" '
- '--event-hub-resource-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.EventHu'
- 'b/namespaces/eventhubTestns1/eventhubs/eventhubTest1" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: AttachedDatabaseConfigurationsCreateOrUpdate
-@try_manual
-def step_attacheddatabaseconfigurationscreateorupdate(test, rg):
- test.cmd('az kusto attached-database-configuration create '
- '--name "{myAttachedDatabaseConfiguration2}" '
- '--cluster-name "{myCluster}" '
- '--location "westus" '
- '--cluster-resource-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Kusto/Clu'
- 'sters/{myCluster3}" '
- '--database-name "kustodatabase" '
- '--default-principals-modification-kind "Union" '
- '--resource-group "{rg}"',
- checks=[
- test.check("location", "westus", case_sensitive=False),
- test.check("clusterResourceId", "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Micros"
- "oft.Kusto/Clusters/{myCluster3}", case_sensitive=False),
- test.check("defaultPrincipalsModificationKind", "Union", case_sensitive=False),
- ])
- test.cmd('az kusto attached-database-configuration wait --created '
- '--name "{myAttachedDatabaseConfiguration2}" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: AttachedDatabaseConfigurationsGet
-@try_manual
-def step_attacheddatabaseconfigurationsget(test, rg):
- test.cmd('az kusto attached-database-configuration show '
- '--name "{myAttachedDatabaseConfiguration2}" '
- '--cluster-name "{myCluster}" '
- '--resource-group "{rg}"',
- checks=[
- test.check("location", "westus", case_sensitive=False),
- test.check("defaultPrincipalsModificationKind", "Union", case_sensitive=False),
- ])
-
-
-# EXAMPLE: KustoDataConnectionsGet
-@try_manual
-def step_kustodataconnectionsget(test, rg):
- test.cmd('az kusto data-connection show '
- '--cluster-name "{myCluster}" '
- '--name "{myDataConnection}" '
- '--database-name "KustoDatabase8" '
- '--resource-group "{rg}"',
- checks=[
- test.check("location", "westus", case_sensitive=False),
- test.check("consumerGroup", "testConsumerGroup1", case_sensitive=False),
- test.check("eventHubResourceId", "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Micro"
- "soft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1", case_sensitive=False),
- ])
-
-
-# EXAMPLE: KustoDatabasesListByCluster
-@try_manual
-def step_kustodatabaseslistbycluster(test, rg):
- test.cmd('az kusto database list '
- '--cluster-name "{myCluster}" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoAttachedDatabaseConfigurationsListByCluster
-@try_manual
-def step_kustoattacheddatabaseconfigurationslistbyclus(test, rg):
- test.cmd('az kusto attached-database-configuration list '
- '--cluster-name "{myCluster}" '
- '--resource-group "{rg}"',
- checks=[
- test.check('length(@)', 1),
- ])
-
-
-# EXAMPLE: KustoDatabasesGet
-@try_manual
-def step_kustodatabasesget(test, rg):
- test.cmd('az kusto database show '
- '--cluster-name "{myCluster}" '
- '--database-name "KustoDatabase8" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoDatabasesListByCluster
-@try_manual
-def step_kustodatabaseslistbycluster(test, rg):
- test.cmd('az kusto database list '
- '--cluster-name "{myCluster}" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoClustersListResourceSkus
-@try_manual
-def step_kustoclusterslistresourceskus(test, rg):
- test.cmd('az kusto cluster list-sku '
- '--name "{myCluster}" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoClustersGet
-@try_manual
-def step_kustoclustersget(test, rg):
- test.cmd('az kusto cluster show '
- '--name "{myCluster}" '
- '--resource-group "{rg}"',
- checks=[
- test.check("name", "{myCluster}", case_sensitive=False),
- test.check("identity.type", "SystemAssigned", case_sensitive=False),
- test.check("location", "westus", case_sensitive=False),
- test.check("enableStreamingIngest", True),
- test.check("sku.name", "Standard_L8s", case_sensitive=False),
- test.check("sku.capacity", 2),
- test.check("sku.tier", "Standard", case_sensitive=False),
- ])
-
-
-# EXAMPLE: KustoClustersListByResourceGroup
-@try_manual
-def step_kustoclusterslistbyresourcegroup(test, rg):
- test.cmd('az kusto cluster list '
- '--resource-group "{rg}"',
- checks=[
- test.check('length(@)', 1),
- ])
-
-
-# EXAMPLE: KustoClustersList
-@try_manual
-def step_kustoclusterslist(test, rg):
- test.cmd('az kusto cluster list '
- '-g ""',
- checks=[
- test.check('length(@)', 1),
- ])
-
-
-# EXAMPLE: KustoClustersListSkus
-@try_manual
-def step_kustoclusterslistskus(test, rg):
- test.cmd('az kusto cluster list-sku '
- '-g ""',
- checks=[])
-
-
-# EXAMPLE: KustoOperationsList
-@try_manual
-def step_kustooperationslist(test, rg):
- # EXAMPLE NOT FOUND!
+def cleanup_scenario(test, rg):
pass
-# EXAMPLE: KustoDataConnectionsUpdate
-@try_manual
-def step_kustodataconnectionsupdate(test, rg):
- test.cmd('az kusto data-connection event-hub update '
- '--cluster-name "{myCluster}" '
- '--name "{myDataConnection}" '
- '--database-name "KustoDatabase8" '
- '--location "westus" '
- '--consumer-group "testConsumerGroup1" '
- '--event-hub-resource-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.EventHu'
- 'b/namespaces/eventhubTestns1/eventhubs/eventhubTest1" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoDataConnectionValidation
-@try_manual
-def step_kustodataconnectionvalidation(test, rg):
- test.cmd('az kusto data-connection event-hub data-connection-validation '
- '--cluster-name "{myCluster}" '
- '--database-name "KustoDatabase8" '
- '--name "{myDataConnection}" '
- '--consumer-group "testConsumerGroup1" '
- '--event-hub-resource-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.EventHu'
- 'b/namespaces/eventhubTestns1/eventhubs/eventhubTest1" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoDataConnectionsCheckNameAvailability
-@try_manual
-def step_kustodataconnectionschecknameavailability(test, rg):
- # EXAMPLE NOT FOUND!
- pass
-
-
-# EXAMPLE: KustoDatabaseRemovePrincipals
-@try_manual
-def step_kustodatabaseremoveprincipals(test, rg):
- test.cmd('az kusto database remove-principal '
- '--cluster-name "{myCluster}" '
- '--database-name "KustoDatabase8" '
- '--value name="Some User" type="User" app-id="" email="user@microsoft.com" fqn="aaduser role="Admin" '
- '--value name="Kusto" type="Group" app-id="" email="kusto@microsoft.com" fqn="aadgroup role="Viewer" '
- '--value name="SomeApp" type="App" app-id="some_guid_app_id" email="" fqn="aadapp role="Admin" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoDatabaseListPrincipals
-@try_manual
-def step_kustodatabaselistprincipals(test, rg):
- test.cmd('az kusto database list-principal '
- '--cluster-name "{myCluster}" '
- '--database-name "KustoDatabase8" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoDatabaseAddPrincipals
-@try_manual
-def step_kustodatabaseaddprincipals(test, rg):
- test.cmd('az kusto database add-principal '
- '--cluster-name "{myCluster}" '
- '--database-name "KustoDatabase8" '
- '--value name="Some User" type="User" app-id="" email="user@microsoft.com" fqn="aaduser role="Admin" '
- '--value name="Kusto" type="Group" app-id="" email="kusto@microsoft.com" fqn="aadgroup role="Viewer" '
- '--value name="SomeApp" type="App" app-id="some_guid_app_id" email="" fqn="aadapp role="Admin" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoDatabasesUpdate
-@try_manual
-def step_kustodatabasesupdate(test, rg):
- test.cmd('az kusto database update '
- '--cluster-name "{myCluster}" '
- '--database-name "KustoDatabase8" '
- '--parameters "{{\\"properties\\":{{\\"softDeletePeriod\\":\\"P1D\\"}}}}" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoClusterDetachFollowerDatabases
-@try_manual
-def step_kustoclusterdetachfollowerdatabases(test, rg):
- test.cmd('az kusto cluster detach-follower-database '
- '--name "{myCluster}" '
- '--attached-database-configuration-name "{myAttachedDatabaseConfiguration}" '
- '--cluster-resource-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Kusto/clu'
- 'sters/{myCluster2}" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoDatabaseCheckNameAvailability
-@try_manual
-def step_kustodatabasechecknameavailability(test, rg):
- # EXAMPLE NOT FOUND!
- pass
-
-
-# EXAMPLE: KustoClusterListFollowerDatabases
-@try_manual
-def step_kustoclusterlistfollowerdatabases(test, rg):
- test.cmd('az kusto cluster list-follower-database '
- '--name "{myCluster}" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoClustersStart
-@try_manual
-def step_kustoclustersstart(test, rg):
- test.cmd('az kusto cluster start '
- '--name "{myCluster}" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoClustersStop
-@try_manual
-def step_kustoclustersstop(test, rg):
- test.cmd('az kusto cluster stop '
- '--name "{myCluster}" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoClustersUpdate
-@try_manual
-def step_kustoclustersupdate(test, rg):
- test.cmd('az kusto cluster update '
- '--name "{myCluster}" '
- '--identity-type "SystemAssigned" '
- '--location "westus" '
- '--enable-purge true '
- '--enable-streaming-ingest true '
- '--engine-type "V2" '
- '--key-vault-properties key-name="keyName" key-vault-uri="https://dummy.keyvault.com" '
- 'key-version="keyVersion" '
- '--resource-group "{rg}"',
- checks=[
- test.check("name", "{myCluster}", case_sensitive=False),
- test.check("identity.type", "SystemAssigned", case_sensitive=False),
- test.check("location", "westus", case_sensitive=False),
- test.check("enablePurge", True),
- test.check("enableStreamingIngest", True),
- test.check("engineType", "V2", case_sensitive=False),
- test.check("keyVaultProperties.keyName", "keyName", case_sensitive=False),
- test.check("keyVaultProperties.keyVaultUri", "https://dummy.keyvault.com", case_sensitive=False),
- test.check("keyVaultProperties.keyVersion", "keyVersion", case_sensitive=False),
- ])
-
-
-# EXAMPLE: KustoClustersCheckNameAvailability
-@try_manual
-def step_kustoclusterschecknameavailability(test, rg):
- # EXAMPLE NOT FOUND!
- pass
-
-
-# EXAMPLE: AttachedDatabaseConfigurationsDelete
-@try_manual
-def step_attacheddatabaseconfigurationsdelete(test, rg):
- test.cmd('az kusto attached-database-configuration delete -y '
- '--name "{myAttachedDatabaseConfiguration2}" '
- '--cluster-name "{myCluster}" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoDataConnectionsDelete
-@try_manual
-def step_kustodataconnectionsdelete(test, rg):
- test.cmd('az kusto data-connection delete -y '
- '--cluster-name "{myCluster}" '
- '--name "{myDataConnection2}" '
- '--database-name "KustoDatabase8" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoDatabasesDelete
-@try_manual
-def step_kustodatabasesdelete(test, rg):
- test.cmd('az kusto database delete -y '
- '--cluster-name "{myCluster}" '
- '--database-name "KustoDatabase8" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoClustersDelete
-@try_manual
-def step_kustoclustersdelete(test, rg):
- test.cmd('az kusto cluster delete -y '
- '--name "{myCluster}" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoDatabasePrincipalAssignmentsGet
-@try_manual
-def step_kustodatabaseprincipalassignmentsget(test, rg):
- test.cmd('az kusto database-principal-assignment show '
- '--cluster-name "{myCluster}" '
- '--database-name "Kustodatabase8" '
- '--principal-assignment-name "kustoprincipal1" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoDatabasePrincipalAssignmentsCreateOrUpdate
-@try_manual
-def step_kustodatabaseprincipalassignmentscreateorupda(test, rg):
- test.cmd('az kusto database-principal-assignment create '
- '--cluster-name "{myCluster}" '
- '--database-name "Kustodatabase8" '
- '--principal-id "87654321-1234-1234-1234-123456789123" '
- '--principal-type "App" '
- '--role "Admin" '
- '--tenant-id "12345678-1234-1234-1234-123456789123" '
- '--principal-assignment-name "kustoprincipal1" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoDatabasePrincipalAssignmentsDelete
-@try_manual
-def step_kustodatabaseprincipalassignmentsdelete(test, rg):
- test.cmd('az kusto database-principal-assignment delete -y '
- '--cluster-name "{myCluster}" '
- '--database-name "Kustodatabase8" '
- '--principal-assignment-name "kustoprincipal1" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoClusterPrincipalAssignmentsGet
-@try_manual
-def step_kustoclusterprincipalassignmentsget(test, rg):
- test.cmd('az kusto cluster-principal-assignment show '
- '--cluster-name "{myCluster}" '
- '--principal-assignment-name "kustoprincipal1" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoClusterPrincipalAssignmentsCreateOrUpdate
-@try_manual
-def step_kustoclusterprincipalassignmentscreateorupdat(test, rg):
- test.cmd('az kusto cluster-principal-assignment create '
- '--cluster-name "{myCluster}" '
- '--principal-id "87654321-1234-1234-1234-123456789123" '
- '--principal-type "App" '
- '--role "AllDatabasesAdmin" '
- '--tenant-id "12345678-1234-1234-1234-123456789123" '
- '--principal-assignment-name "kustoprincipal1" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# EXAMPLE: KustoClusterPrincipalAssignmentsDelete
-@try_manual
-def step_kustoclusterprincipalassignmentsdelete(test, rg):
- test.cmd('az kusto cluster-principal-assignment delete -y '
- '--cluster-name "{myCluster}" '
- '--principal-assignment-name "kustoprincipal1" '
- '--resource-group "{rg}"',
- checks=[])
-
-
-# Env cleanup
-@try_manual
-def cleanup(test, rg):
- pass
-
-
-# Testcase
+# Testcase: Scenario
@try_manual
def call_scenario(test, rg):
- setup(test, rg)
- step_kustoclusterscreateorupdate(test, rg)
- step_kustodatabasescreateorupdate(test, rg)
- step_kustodataconnectionscreateorupdate(test, rg)
- step_attacheddatabaseconfigurationscreateorupdate(test, rg)
- step_attacheddatabaseconfigurationsget(test, rg)
- step_kustodataconnectionsget(test, rg)
- step_kustodatabaseslistbycluster(test, rg)
- step_kustoattacheddatabaseconfigurationslistbyclus(test, rg)
- step_kustodatabasesget(test, rg)
- step_kustodatabaseslistbycluster(test, rg)
- step_kustoclusterslistresourceskus(test, rg)
- step_kustoclustersget(test, rg)
- step_kustoclusterslistbyresourcegroup(test, rg)
- step_kustoclusterslist(test, rg)
- step_kustoclusterslistskus(test, rg)
- step_kustooperationslist(test, rg)
- step_kustodataconnectionsupdate(test, rg)
- step_kustodataconnectionvalidation(test, rg)
- step_kustodataconnectionschecknameavailability(test, rg)
- step_kustodatabaseremoveprincipals(test, rg)
- step_kustodatabaselistprincipals(test, rg)
- step_kustodatabaseaddprincipals(test, rg)
- step_kustodatabasesupdate(test, rg)
- step_kustoclusterdetachfollowerdatabases(test, rg)
- step_kustodatabasechecknameavailability(test, rg)
- step_kustoclusterlistfollowerdatabases(test, rg)
- step_kustoclustersstart(test, rg)
- step_kustoclustersstop(test, rg)
- step_kustoclustersupdate(test, rg)
- step_kustoclusterschecknameavailability(test, rg)
- step_attacheddatabaseconfigurationsdelete(test, rg)
- step_kustodataconnectionsdelete(test, rg)
- step_kustodatabasesdelete(test, rg)
- step_kustoclustersdelete(test, rg)
- step_kustodatabaseprincipalassignmentsget(test, rg)
- step_kustodatabaseprincipalassignmentscreateorupda(test, rg)
- step_kustodatabaseprincipalassignmentsdelete(test, rg)
- step_kustoclusterprincipalassignmentsget(test, rg)
- step_kustoclusterprincipalassignmentscreateorupdat(test, rg)
- step_kustoclusterprincipalassignmentsdelete(test, rg)
- cleanup(test, rg)
-
-
-@try_manual
-class KustoManagementClientScenarioTest(ScenarioTest):
-
- @ResourceGroupPreparer(name_prefix='clitestkusto_kustorptest'[:7], key='rg', parameter_name='rg')
- def test_kusto(self, rg):
-
+ setup_scenario(test, rg)
+ step_cluster_create(test, rg, checks=[
+ test.check("name", "{myCluster}", case_sensitive=False),
+ test.check("identity.type", "SystemAssigned", case_sensitive=False),
+ test.check("location", "westus", case_sensitive=False),
+ test.check("enableDoubleEncryption", False),
+ test.check("enablePurge", True),
+ test.check("enableStreamingIngest", True),
+ test.check("sku.name", "Standard_L8s", case_sensitive=False),
+ test.check("sku.capacity", 2),
+ test.check("sku.tier", "Standard", case_sensitive=False),
+ ])
+ step_database_create(test, rg, checks=[])
+ step_data_connection_event_hub_create(test, rg, checks=[])
+ step_attached_database_configuration_create(test, rg, checks=[
+ test.check("location", "westus", case_sensitive=False),
+ test.check("clusterResourceId", "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Kusto"
+ "/Clusters/{myCluster3}", case_sensitive=False),
+ test.check("defaultPrincipalsModificationKind", "Union", case_sensitive=False),
+ ])
+ step_attached_database_configuration_show(test, rg, checks=[
+ test.check("location", "westus", case_sensitive=False),
+ test.check("defaultPrincipalsModificationKind", "Union", case_sensitive=False),
+ ])
+ step_data_connection_show(test, rg, checks=[
+ test.check("location", "westus", case_sensitive=False),
+ test.check("consumerGroup", "testConsumerGroup1", case_sensitive=False),
+ test.check("eventHubResourceId", "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Even"
+ "tHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1", case_sensitive=False),
+ ])
+ step_database_list(test, rg, checks=[])
+ step_attached_database_configuration_list(test, rg, checks=[
+ test.check('length(@)', 1),
+ ])
+ step_database_show(test, rg, checks=[])
+ step_database_list(test, rg, checks=[])
+ step_cluster_list_sku(test, rg, checks=[])
+ step_cluster_show(test, rg, checks=[
+ test.check("name", "{myCluster}", case_sensitive=False),
+ test.check("identity.type", "SystemAssigned", case_sensitive=False),
+ test.check("location", "westus", case_sensitive=False),
+ test.check("enableStreamingIngest", True),
+ test.check("sku.name", "Standard_L8s", case_sensitive=False),
+ test.check("sku.capacity", 2),
+ test.check("sku.tier", "Standard", case_sensitive=False),
+ ])
+ step_cluster_list2(test, rg, checks=[
+ test.check('length(@)', 1),
+ ])
+ step_cluster_list(test, rg, checks=[
+ test.check('length(@)', 1),
+ ])
+ step_cluster_list_sku2(test, rg, checks=[])
+ # STEP NOT FOUND: KustoOperationsList
+ step_data_connection_event_hub_update(test, rg, checks=[])
+ step_data_connection_event(test, rg, checks=[])
+ # STEP NOT FOUND: KustoDataConnectionsCheckNameAvailability
+ step_database_remove_principal(test, rg, checks=[])
+ step_database_list_principal(test, rg, checks=[])
+ step_database_add_principal(test, rg, checks=[])
+ step_database_update(test, rg, checks=[])
+ step_cluster_detach_follower_database(test, rg, checks=[])
+ # STEP NOT FOUND: KustoDatabaseCheckNameAvailability
+ step_cluster_list_follower_database(test, rg, checks=[])
+ step_cluster_start(test, rg, checks=[])
+ step_cluster_stop(test, rg, checks=[])
+ step_cluster_update(test, rg, checks=[
+ test.check("name", "{myCluster}", case_sensitive=False),
+ test.check("identity.type", "SystemAssigned", case_sensitive=False),
+ test.check("location", "westus", case_sensitive=False),
+ test.check("enablePurge", True),
+ test.check("enableStreamingIngest", True),
+ test.check("engineType", "V2", case_sensitive=False),
+ test.check("keyVaultProperties.keyName", "keyName", case_sensitive=False),
+ test.check("keyVaultProperties.keyVaultUri", "https://dummy.keyvault.com", case_sensitive=False),
+ test.check("keyVaultProperties.keyVersion", "keyVersion", case_sensitive=False),
+ ])
+ # STEP NOT FOUND: KustoClustersCheckNameAvailability
+ step_attached_database_configuration_delete(test, rg, checks=[])
+ step_data_connection_delete(test, rg, checks=[])
+ step_database_delete(test, rg, checks=[])
+ step_cluster_delete(test, rg, checks=[])
+ step_database_principal_assignment_show(test, rg, checks=[])
+ step_database_principal_assignment_create(test, rg, checks=[])
+ step_database_principal_assignment_delete(test, rg, checks=[])
+ step_cluster_principal_assignment_show(test, rg, checks=[])
+ step_cluster_principal_assignment_create(test, rg, checks=[])
+ step_cluster_principal_assignment_delete(test, rg, checks=[])
+ cleanup_scenario(test, rg)
+
+
+# Test class for Scenario
+@try_manual
+class KustoScenarioTest(ScenarioTest):
+
+ def __init__(self, *args, **kwargs):
+ super(KustoScenarioTest, self).__init__(*args, **kwargs)
self.kwargs.update({
'subscription_id': self.get_subscription_id()
})
@@ -579,6 +184,10 @@ def test_kusto(self, rg):
'myDataConnection2': 'kustoeventhubconnection1',
})
+
+ @ResourceGroupPreparer(name_prefix='clitestkusto_kustorptest'[:7], key='rg', parameter_name='rg')
+ def test_kusto_Scenario(self, rg):
call_scenario(self, rg)
calc_coverage(__file__)
raise_if()
+
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/_configuration.py b/src/kusto/azext_kusto/vendored_sdks/kusto/_configuration.py
index 2985b2104e7..86044cf7a04 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/_configuration.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/_configuration.py
@@ -48,8 +48,7 @@ def __init__(
self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-09-18"
- self.credential_scopes = ['https://management.azure.com/.default']
- self.credential_scopes.extend(kwargs.pop('credential_scopes', []))
+ self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'kustomanagementclient/{}'.format(VERSION))
self._configure(**kwargs)
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/_kusto_management_client.py b/src/kusto/azext_kusto/vendored_sdks/kusto/_kusto_management_client.py
index d801def53bd..349af8f9ea4 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/_kusto_management_client.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/_kusto_management_client.py
@@ -18,33 +18,33 @@
from azure.core.credentials import TokenCredential
from ._configuration import KustoManagementClientConfiguration
-from .operations import ClusterOperations
-from .operations import ClusterPrincipalAssignmentOperations
-from .operations import DatabaseOperations
-from .operations import DatabasePrincipalAssignmentOperations
-from .operations import AttachedDatabaseConfigurationOperations
-from .operations import DataConnectionOperations
-from .operations import OperationOperations
+from .operations import ClustersOperations
+from .operations import ClusterPrincipalAssignmentsOperations
+from .operations import DatabasesOperations
+from .operations import DatabasePrincipalAssignmentsOperations
+from .operations import AttachedDatabaseConfigurationsOperations
+from .operations import DataConnectionsOperations
+from .operations import Operations
from . import models
class KustoManagementClient(object):
"""The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases.
- :ivar cluster: ClusterOperations operations
- :vartype cluster: kusto_management_client.operations.ClusterOperations
- :ivar cluster_principal_assignment: ClusterPrincipalAssignmentOperations operations
- :vartype cluster_principal_assignment: kusto_management_client.operations.ClusterPrincipalAssignmentOperations
- :ivar database: DatabaseOperations operations
- :vartype database: kusto_management_client.operations.DatabaseOperations
- :ivar database_principal_assignment: DatabasePrincipalAssignmentOperations operations
- :vartype database_principal_assignment: kusto_management_client.operations.DatabasePrincipalAssignmentOperations
- :ivar attached_database_configuration: AttachedDatabaseConfigurationOperations operations
- :vartype attached_database_configuration: kusto_management_client.operations.AttachedDatabaseConfigurationOperations
- :ivar data_connection: DataConnectionOperations operations
- :vartype data_connection: kusto_management_client.operations.DataConnectionOperations
- :ivar operation: OperationOperations operations
- :vartype operation: kusto_management_client.operations.OperationOperations
+ :ivar clusters: ClustersOperations operations
+ :vartype clusters: kusto_management_client.operations.ClustersOperations
+ :ivar cluster_principal_assignments: ClusterPrincipalAssignmentsOperations operations
+ :vartype cluster_principal_assignments: kusto_management_client.operations.ClusterPrincipalAssignmentsOperations
+ :ivar databases: DatabasesOperations operations
+ :vartype databases: kusto_management_client.operations.DatabasesOperations
+ :ivar database_principal_assignments: DatabasePrincipalAssignmentsOperations operations
+ :vartype database_principal_assignments: kusto_management_client.operations.DatabasePrincipalAssignmentsOperations
+ :ivar attached_database_configurations: AttachedDatabaseConfigurationsOperations operations
+ :vartype attached_database_configurations: kusto_management_client.operations.AttachedDatabaseConfigurationsOperations
+ :ivar data_connections: DataConnectionsOperations operations
+ :vartype data_connections: kusto_management_client.operations.DataConnectionsOperations
+ :ivar operations: Operations operations
+ :vartype operations: kusto_management_client.operations.Operations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -70,19 +70,19 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
- self.cluster = ClusterOperations(
+ self.clusters = ClustersOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.cluster_principal_assignment = ClusterPrincipalAssignmentOperations(
+ self.cluster_principal_assignments = ClusterPrincipalAssignmentsOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.database = DatabaseOperations(
+ self.databases = DatabasesOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.database_principal_assignment = DatabasePrincipalAssignmentOperations(
+ self.database_principal_assignments = DatabasePrincipalAssignmentsOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.attached_database_configuration = AttachedDatabaseConfigurationOperations(
+ self.attached_database_configurations = AttachedDatabaseConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.data_connection = DataConnectionOperations(
+ self.data_connections = DataConnectionsOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.operation = OperationOperations(
+ self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
def close(self):
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/_version.py b/src/kusto/azext_kusto/vendored_sdks/kusto/_version.py
deleted file mode 100644
index 60c349ae6a8..00000000000
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/_version.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# coding=utf-8
-# --------------------------------------------------------------------------
-# Copyright (c) Microsoft Corporation. All rights reserved.
-# Licensed under the MIT License. See License.txt in the project root for license information.
-# Code generated by Microsoft (R) AutoRest Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-VERSION = "0.1.0"
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/__init__.py b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/__init__.py
index 1fb64aee341..1fd2725469e 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/__init__.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/__init__.py
@@ -6,5 +6,5 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from ._kusto_management_client_async import KustoManagementClient
+from ._kusto_management_client import KustoManagementClient
__all__ = ['KustoManagementClient']
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/_configuration_async.py b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/_configuration.py
similarity index 95%
rename from src/kusto/azext_kusto/vendored_sdks/kusto/aio/_configuration_async.py
rename to src/kusto/azext_kusto/vendored_sdks/kusto/aio/_configuration.py
index 2a3459bf5ae..7e716f35c4e 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/_configuration_async.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/_configuration.py
@@ -45,8 +45,7 @@ def __init__(
self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-09-18"
- self.credential_scopes = ['https://management.azure.com/.default']
- self.credential_scopes.extend(kwargs.pop('credential_scopes', []))
+ self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'kustomanagementclient/{}'.format(VERSION))
self._configure(**kwargs)
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/_kusto_management_client_async.py b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/_kusto_management_client.py
similarity index 58%
rename from src/kusto/azext_kusto/vendored_sdks/kusto/aio/_kusto_management_client_async.py
rename to src/kusto/azext_kusto/vendored_sdks/kusto/aio/_kusto_management_client.py
index cd74af7f704..ba6db69d88a 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/_kusto_management_client_async.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/_kusto_management_client.py
@@ -15,34 +15,34 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential
-from ._configuration_async import KustoManagementClientConfiguration
-from .operations_async import ClusterOperations
-from .operations_async import ClusterPrincipalAssignmentOperations
-from .operations_async import DatabaseOperations
-from .operations_async import DatabasePrincipalAssignmentOperations
-from .operations_async import AttachedDatabaseConfigurationOperations
-from .operations_async import DataConnectionOperations
-from .operations_async import OperationOperations
+from ._configuration import KustoManagementClientConfiguration
+from .operations import ClustersOperations
+from .operations import ClusterPrincipalAssignmentsOperations
+from .operations import DatabasesOperations
+from .operations import DatabasePrincipalAssignmentsOperations
+from .operations import AttachedDatabaseConfigurationsOperations
+from .operations import DataConnectionsOperations
+from .operations import Operations
from .. import models
class KustoManagementClient(object):
"""The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases.
- :ivar cluster: ClusterOperations operations
- :vartype cluster: kusto_management_client.aio.operations_async.ClusterOperations
- :ivar cluster_principal_assignment: ClusterPrincipalAssignmentOperations operations
- :vartype cluster_principal_assignment: kusto_management_client.aio.operations_async.ClusterPrincipalAssignmentOperations
- :ivar database: DatabaseOperations operations
- :vartype database: kusto_management_client.aio.operations_async.DatabaseOperations
- :ivar database_principal_assignment: DatabasePrincipalAssignmentOperations operations
- :vartype database_principal_assignment: kusto_management_client.aio.operations_async.DatabasePrincipalAssignmentOperations
- :ivar attached_database_configuration: AttachedDatabaseConfigurationOperations operations
- :vartype attached_database_configuration: kusto_management_client.aio.operations_async.AttachedDatabaseConfigurationOperations
- :ivar data_connection: DataConnectionOperations operations
- :vartype data_connection: kusto_management_client.aio.operations_async.DataConnectionOperations
- :ivar operation: OperationOperations operations
- :vartype operation: kusto_management_client.aio.operations_async.OperationOperations
+ :ivar clusters: ClustersOperations operations
+ :vartype clusters: kusto_management_client.aio.operations.ClustersOperations
+ :ivar cluster_principal_assignments: ClusterPrincipalAssignmentsOperations operations
+ :vartype cluster_principal_assignments: kusto_management_client.aio.operations.ClusterPrincipalAssignmentsOperations
+ :ivar databases: DatabasesOperations operations
+ :vartype databases: kusto_management_client.aio.operations.DatabasesOperations
+ :ivar database_principal_assignments: DatabasePrincipalAssignmentsOperations operations
+ :vartype database_principal_assignments: kusto_management_client.aio.operations.DatabasePrincipalAssignmentsOperations
+ :ivar attached_database_configurations: AttachedDatabaseConfigurationsOperations operations
+ :vartype attached_database_configurations: kusto_management_client.aio.operations.AttachedDatabaseConfigurationsOperations
+ :ivar data_connections: DataConnectionsOperations operations
+ :vartype data_connections: kusto_management_client.aio.operations.DataConnectionsOperations
+ :ivar operations: Operations operations
+ :vartype operations: kusto_management_client.aio.operations.Operations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -67,19 +67,19 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
- self.cluster = ClusterOperations(
+ self.clusters = ClustersOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.cluster_principal_assignment = ClusterPrincipalAssignmentOperations(
+ self.cluster_principal_assignments = ClusterPrincipalAssignmentsOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.database = DatabaseOperations(
+ self.databases = DatabasesOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.database_principal_assignment = DatabasePrincipalAssignmentOperations(
+ self.database_principal_assignments = DatabasePrincipalAssignmentsOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.attached_database_configuration = AttachedDatabaseConfigurationOperations(
+ self.attached_database_configurations = AttachedDatabaseConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.data_connection = DataConnectionOperations(
+ self.data_connections = DataConnectionsOperations(
self._client, self._config, self._serialize, self._deserialize)
- self.operation = OperationOperations(
+ self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
async def close(self) -> None:
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/__init__.py b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/__init__.py
new file mode 100644
index 00000000000..fb6fa595386
--- /dev/null
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/__init__.py
@@ -0,0 +1,25 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from ._clusters_operations import ClustersOperations
+from ._cluster_principal_assignments_operations import ClusterPrincipalAssignmentsOperations
+from ._databases_operations import DatabasesOperations
+from ._database_principal_assignments_operations import DatabasePrincipalAssignmentsOperations
+from ._attached_database_configurations_operations import AttachedDatabaseConfigurationsOperations
+from ._data_connections_operations import DataConnectionsOperations
+from ._operations import Operations
+
+__all__ = [
+ 'ClustersOperations',
+ 'ClusterPrincipalAssignmentsOperations',
+ 'DatabasesOperations',
+ 'DatabasePrincipalAssignmentsOperations',
+ 'AttachedDatabaseConfigurationsOperations',
+ 'DataConnectionsOperations',
+ 'Operations',
+]
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_attached_database_configuration_operations_async.py b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_attached_database_configurations_operations.py
similarity index 87%
rename from src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_attached_database_configuration_operations_async.py
rename to src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_attached_database_configurations_operations.py
index 8ba0e61d8a1..44ce3caa4fc 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_attached_database_configuration_operations_async.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_attached_database_configurations_operations.py
@@ -9,7 +9,7 @@
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
@@ -21,8 +21,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
-class AttachedDatabaseConfigurationOperations:
- """AttachedDatabaseConfigurationOperations async operations.
+class AttachedDatabaseConfigurationsOperations:
+ """AttachedDatabaseConfigurationsOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
@@ -61,14 +61,17 @@ def list_by_cluster(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.AttachedDatabaseConfigurationListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
@@ -135,9 +138,12 @@ async def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.AttachedDatabaseConfiguration"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -155,7 +161,7 @@ async def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -178,19 +184,17 @@ async def _create_or_update_initial(
resource_group_name: str,
cluster_name: str,
attached_database_configuration_name: str,
- location: Optional[str] = None,
- database_name: Optional[str] = None,
- cluster_resource_id: Optional[str] = None,
- default_principals_modification_kind: Optional[Union[str, "models.DefaultPrincipalsModificationKind"]] = None,
+ parameters: "models.AttachedDatabaseConfiguration",
**kwargs
) -> "models.AttachedDatabaseConfiguration":
cls = kwargs.pop('cls', None) # type: ClsType["models.AttachedDatabaseConfiguration"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- parameters = models.AttachedDatabaseConfiguration(location=location, database_name=database_name, cluster_resource_id=cluster_resource_id, default_principals_modification_kind=default_principals_modification_kind)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._create_or_update_initial.metadata['url'] # type: ignore
@@ -209,13 +213,12 @@ async def _create_or_update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'AttachedDatabaseConfiguration')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -243,10 +246,7 @@ async def begin_create_or_update(
resource_group_name: str,
cluster_name: str,
attached_database_configuration_name: str,
- location: Optional[str] = None,
- database_name: Optional[str] = None,
- cluster_resource_id: Optional[str] = None,
- default_principals_modification_kind: Optional[Union[str, "models.DefaultPrincipalsModificationKind"]] = None,
+ parameters: "models.AttachedDatabaseConfiguration",
**kwargs
) -> AsyncLROPoller["models.AttachedDatabaseConfiguration"]:
"""Creates or updates an attached database configuration.
@@ -257,16 +257,8 @@ async def begin_create_or_update(
:type cluster_name: str
:param attached_database_configuration_name: The name of the attached database configuration.
:type attached_database_configuration_name: str
- :param location: Resource location.
- :type location: str
- :param database_name: The name of the database which you would like to attach, use * if you
- want to follow all current and future databases.
- :type database_name: str
- :param cluster_resource_id: The resource id of the cluster where the databases you would like
- to attach reside.
- :type cluster_resource_id: str
- :param default_principals_modification_kind: The default principals modification kind.
- :type default_principals_modification_kind: str or ~kusto_management_client.models.DefaultPrincipalsModificationKind
+ :param parameters: The database parameters supplied to the CreateOrUpdate operation.
+ :type parameters: ~kusto_management_client.models.AttachedDatabaseConfiguration
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -289,10 +281,7 @@ async def begin_create_or_update(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
attached_database_configuration_name=attached_database_configuration_name,
- location=location,
- database_name=database_name,
- cluster_resource_id=cluster_resource_id,
- default_principals_modification_kind=default_principals_modification_kind,
+ parameters=parameters,
cls=lambda x,y,z: x,
**kwargs
)
@@ -307,7 +296,14 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'attachedDatabaseConfigurationName': self._serialize.url("attached_database_configuration_name", attached_database_configuration_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -329,9 +325,12 @@ async def _delete_initial(
**kwargs
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
@@ -349,6 +348,7 @@ async def _delete_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -411,7 +411,14 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'attachedDatabaseConfigurationName': self._serialize.url("attached_database_configuration_name", attached_database_configuration_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_cluster_principal_assignment_operations_async.py b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_cluster_principal_assignments_operations.py
similarity index 87%
rename from src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_cluster_principal_assignment_operations_async.py
rename to src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_cluster_principal_assignments_operations.py
index 629a5c0f756..5e94b702916 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_cluster_principal_assignment_operations_async.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_cluster_principal_assignments_operations.py
@@ -9,7 +9,7 @@
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
@@ -21,8 +21,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
-class ClusterPrincipalAssignmentOperations:
- """ClusterPrincipalAssignmentOperations async operations.
+class ClusterPrincipalAssignmentsOperations:
+ """ClusterPrincipalAssignmentsOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
@@ -47,8 +47,7 @@ async def check_name_availability(
self,
resource_group_name: str,
cluster_name: str,
- name: str,
- type: Union[str, "models.Type"],
+ principal_assignment_name: "models.ClusterPrincipalAssignmentCheckNameRequest",
**kwargs
) -> "models.CheckNameResult":
"""Checks that the principal assignment name is valid and is not already in use.
@@ -57,22 +56,21 @@ async def check_name_availability(
:type resource_group_name: str
:param cluster_name: The name of the Kusto cluster.
:type cluster_name: str
- :param name: Principal Assignment resource name.
- :type name: str
- :param type: The type of resource, Microsoft.Kusto/clusters/principalAssignments.
- :type type: str or ~kusto_management_client.models.Type
+ :param principal_assignment_name: The name of the principal assignment.
+ :type principal_assignment_name: ~kusto_management_client.models.ClusterPrincipalAssignmentCheckNameRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:return: CheckNameResult, or the result of cls(response)
:rtype: ~kusto_management_client.models.CheckNameResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- principal_assignment_name = models.ClusterPrincipalAssignmentCheckNameRequest(name=name, type=type)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.check_name_availability.metadata['url'] # type: ignore
@@ -90,13 +88,12 @@ async def check_name_availability(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(principal_assignment_name, 'ClusterPrincipalAssignmentCheckNameRequest')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -133,9 +130,12 @@ async def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterPrincipalAssignment"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -153,7 +153,7 @@ async def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -176,19 +176,17 @@ async def _create_or_update_initial(
resource_group_name: str,
cluster_name: str,
principal_assignment_name: str,
- principal_id: Optional[str] = None,
- role: Optional[Union[str, "models.ClusterPrincipalRole"]] = None,
- tenant_id: Optional[str] = None,
- principal_type: Optional[Union[str, "models.PrincipalType"]] = None,
+ parameters: "models.ClusterPrincipalAssignment",
**kwargs
) -> "models.ClusterPrincipalAssignment":
cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterPrincipalAssignment"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- parameters = models.ClusterPrincipalAssignment(principal_id=principal_id, role=role, tenant_id=tenant_id, principal_type=principal_type)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._create_or_update_initial.metadata['url'] # type: ignore
@@ -207,13 +205,12 @@ async def _create_or_update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'ClusterPrincipalAssignment')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -238,10 +235,7 @@ async def begin_create_or_update(
resource_group_name: str,
cluster_name: str,
principal_assignment_name: str,
- principal_id: Optional[str] = None,
- role: Optional[Union[str, "models.ClusterPrincipalRole"]] = None,
- tenant_id: Optional[str] = None,
- principal_type: Optional[Union[str, "models.PrincipalType"]] = None,
+ parameters: "models.ClusterPrincipalAssignment",
**kwargs
) -> AsyncLROPoller["models.ClusterPrincipalAssignment"]:
"""Create a Kusto cluster principalAssignment.
@@ -252,15 +246,9 @@ async def begin_create_or_update(
:type cluster_name: str
:param principal_assignment_name: The name of the Kusto principalAssignment.
:type principal_assignment_name: str
- :param principal_id: The principal ID assigned to the cluster principal. It can be a user
- email, application ID, or security group name.
- :type principal_id: str
- :param role: Cluster principal role.
- :type role: str or ~kusto_management_client.models.ClusterPrincipalRole
- :param tenant_id: The tenant id of the principal.
- :type tenant_id: str
- :param principal_type: Principal type.
- :type principal_type: str or ~kusto_management_client.models.PrincipalType
+ :param parameters: The Kusto cluster principalAssignment's parameters supplied for the
+ operation.
+ :type parameters: ~kusto_management_client.models.ClusterPrincipalAssignment
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -283,10 +271,7 @@ async def begin_create_or_update(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
principal_assignment_name=principal_assignment_name,
- principal_id=principal_id,
- role=role,
- tenant_id=tenant_id,
- principal_type=principal_type,
+ parameters=parameters,
cls=lambda x,y,z: x,
**kwargs
)
@@ -301,7 +286,14 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -323,9 +315,12 @@ async def _delete_initial(
**kwargs
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
@@ -343,6 +338,7 @@ async def _delete_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -405,7 +401,14 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -437,14 +440,17 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterPrincipalAssignmentListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_cluster_operations_async.py b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_clusters_operations.py
similarity index 78%
rename from src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_cluster_operations_async.py
rename to src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_clusters_operations.py
index dc6089fb0ec..ff8d7a2d32b 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_cluster_operations_async.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_clusters_operations.py
@@ -5,11 +5,11 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union
+from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
@@ -21,8 +21,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
-class ClusterOperations:
- """ClusterOperations async operations.
+class ClustersOperations:
+ """ClustersOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
@@ -61,9 +61,12 @@ async def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Cluster"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -80,7 +83,7 @@ async def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -102,30 +105,17 @@ async def _create_or_update_initial(
self,
resource_group_name: str,
cluster_name: str,
- location: str,
- sku: "models.AzureSku",
- tags: Optional[Dict[str, str]] = None,
- zones: Optional[List[str]] = None,
- trusted_external_tenants: Optional[List["models.TrustedExternalTenant"]] = None,
- optimized_autoscale: Optional["models.OptimizedAutoscale"] = None,
- enable_disk_encryption: Optional[bool] = None,
- enable_streaming_ingest: Optional[bool] = False,
- virtual_network_configuration: Optional["models.VirtualNetworkConfiguration"] = None,
- key_vault_properties: Optional["models.KeyVaultProperties"] = None,
- enable_purge: Optional[bool] = False,
- enable_double_encryption: Optional[bool] = False,
- engine_type: Optional[Union[str, "models.EngineType"]] = None,
- type: Optional[Union[str, "models.IdentityType"]] = None,
- user_assigned_identities: Optional[Dict[str, "models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None,
+ parameters: "models.Cluster",
**kwargs
) -> "models.Cluster":
cls = kwargs.pop('cls', None) # type: ClsType["models.Cluster"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- parameters = models.Cluster(tags=tags, location=location, sku=sku, zones=zones, trusted_external_tenants=trusted_external_tenants, optimized_autoscale=optimized_autoscale, enable_disk_encryption=enable_disk_encryption, enable_streaming_ingest=enable_streaming_ingest, virtual_network_configuration=virtual_network_configuration, key_vault_properties=key_vault_properties, enable_purge=enable_purge, enable_double_encryption=enable_double_encryption, engine_type=engine_type, type_identity_type=type, user_assigned_identities=user_assigned_identities)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._create_or_update_initial.metadata['url'] # type: ignore
@@ -143,13 +133,12 @@ async def _create_or_update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'Cluster')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -173,21 +162,7 @@ async def begin_create_or_update(
self,
resource_group_name: str,
cluster_name: str,
- location: str,
- sku: "models.AzureSku",
- tags: Optional[Dict[str, str]] = None,
- zones: Optional[List[str]] = None,
- trusted_external_tenants: Optional[List["models.TrustedExternalTenant"]] = None,
- optimized_autoscale: Optional["models.OptimizedAutoscale"] = None,
- enable_disk_encryption: Optional[bool] = None,
- enable_streaming_ingest: Optional[bool] = False,
- virtual_network_configuration: Optional["models.VirtualNetworkConfiguration"] = None,
- key_vault_properties: Optional["models.KeyVaultProperties"] = None,
- enable_purge: Optional[bool] = False,
- enable_double_encryption: Optional[bool] = False,
- engine_type: Optional[Union[str, "models.EngineType"]] = None,
- type: Optional[Union[str, "models.IdentityType"]] = None,
- user_assigned_identities: Optional[Dict[str, "models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None,
+ parameters: "models.Cluster",
**kwargs
) -> AsyncLROPoller["models.Cluster"]:
"""Create or update a Kusto cluster.
@@ -196,43 +171,8 @@ async def begin_create_or_update(
:type resource_group_name: str
:param cluster_name: The name of the Kusto cluster.
:type cluster_name: str
- :param location: The geo-location where the resource lives.
- :type location: str
- :param sku: The SKU of the cluster.
- :type sku: ~kusto_management_client.models.AzureSku
- :param tags: Resource tags.
- :type tags: dict[str, str]
- :param zones: The availability zones of the cluster.
- :type zones: list[str]
- :param trusted_external_tenants: The cluster's external tenants.
- :type trusted_external_tenants: list[~kusto_management_client.models.TrustedExternalTenant]
- :param optimized_autoscale: Optimized auto scale definition.
- :type optimized_autoscale: ~kusto_management_client.models.OptimizedAutoscale
- :param enable_disk_encryption: A boolean value that indicates if the cluster's disks are
- encrypted.
- :type enable_disk_encryption: bool
- :param enable_streaming_ingest: A boolean value that indicates if the streaming ingest is
- enabled.
- :type enable_streaming_ingest: bool
- :param virtual_network_configuration: Virtual network definition.
- :type virtual_network_configuration: ~kusto_management_client.models.VirtualNetworkConfiguration
- :param key_vault_properties: KeyVault properties for the cluster encryption.
- :type key_vault_properties: ~kusto_management_client.models.KeyVaultProperties
- :param enable_purge: A boolean value that indicates if the purge operations are enabled.
- :type enable_purge: bool
- :param enable_double_encryption: A boolean value that indicates if double encryption is
- enabled.
- :type enable_double_encryption: bool
- :param engine_type: The engine type.
- :type engine_type: str or ~kusto_management_client.models.EngineType
- :param type: The type of managed identity used. The type 'SystemAssigned, UserAssigned'
- includes both an implicitly created identity and a set of user-assigned identities. The type
- 'None' will remove all identities.
- :type type: str or ~kusto_management_client.models.IdentityType
- :param user_assigned_identities: The list of user identities associated with the Kusto cluster.
- The user identity dictionary key references will be ARM resource ids in the form:
- '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- :type user_assigned_identities: dict[str, ~kusto_management_client.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties]
+ :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation.
+ :type parameters: ~kusto_management_client.models.Cluster
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -254,21 +194,7 @@ async def begin_create_or_update(
raw_result = await self._create_or_update_initial(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
- location=location,
- sku=sku,
- tags=tags,
- zones=zones,
- trusted_external_tenants=trusted_external_tenants,
- optimized_autoscale=optimized_autoscale,
- enable_disk_encryption=enable_disk_encryption,
- enable_streaming_ingest=enable_streaming_ingest,
- virtual_network_configuration=virtual_network_configuration,
- key_vault_properties=key_vault_properties,
- enable_purge=enable_purge,
- enable_double_encryption=enable_double_encryption,
- engine_type=engine_type,
- type=type,
- user_assigned_identities=user_assigned_identities,
+ parameters=parameters,
cls=lambda x,y,z: x,
**kwargs
)
@@ -283,7 +209,13 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -301,29 +233,17 @@ async def _update_initial(
self,
resource_group_name: str,
cluster_name: str,
- tags: Optional[Dict[str, str]] = None,
- location: Optional[str] = None,
- sku: Optional["models.AzureSku"] = None,
- trusted_external_tenants: Optional[List["models.TrustedExternalTenant"]] = None,
- optimized_autoscale: Optional["models.OptimizedAutoscale"] = None,
- enable_disk_encryption: Optional[bool] = None,
- enable_streaming_ingest: Optional[bool] = False,
- virtual_network_configuration: Optional["models.VirtualNetworkConfiguration"] = None,
- key_vault_properties: Optional["models.KeyVaultProperties"] = None,
- enable_purge: Optional[bool] = False,
- enable_double_encryption: Optional[bool] = False,
- engine_type: Optional[Union[str, "models.EngineType"]] = None,
- type: Optional[Union[str, "models.IdentityType"]] = None,
- user_assigned_identities: Optional[Dict[str, "models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None,
+ parameters: "models.ClusterUpdate",
**kwargs
) -> "models.Cluster":
cls = kwargs.pop('cls', None) # type: ClsType["models.Cluster"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- parameters = models.ClusterUpdate(tags=tags, location=location, sku=sku, trusted_external_tenants=trusted_external_tenants, optimized_autoscale=optimized_autoscale, enable_disk_encryption=enable_disk_encryption, enable_streaming_ingest=enable_streaming_ingest, virtual_network_configuration=virtual_network_configuration, key_vault_properties=key_vault_properties, enable_purge=enable_purge, enable_double_encryption=enable_double_encryption, engine_type=engine_type, type_identity_type=type, user_assigned_identities=user_assigned_identities)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._update_initial.metadata['url'] # type: ignore
@@ -341,13 +261,12 @@ async def _update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'ClusterUpdate')
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -374,20 +293,7 @@ async def begin_update(
self,
resource_group_name: str,
cluster_name: str,
- tags: Optional[Dict[str, str]] = None,
- location: Optional[str] = None,
- sku: Optional["models.AzureSku"] = None,
- trusted_external_tenants: Optional[List["models.TrustedExternalTenant"]] = None,
- optimized_autoscale: Optional["models.OptimizedAutoscale"] = None,
- enable_disk_encryption: Optional[bool] = None,
- enable_streaming_ingest: Optional[bool] = False,
- virtual_network_configuration: Optional["models.VirtualNetworkConfiguration"] = None,
- key_vault_properties: Optional["models.KeyVaultProperties"] = None,
- enable_purge: Optional[bool] = False,
- enable_double_encryption: Optional[bool] = False,
- engine_type: Optional[Union[str, "models.EngineType"]] = None,
- type: Optional[Union[str, "models.IdentityType"]] = None,
- user_assigned_identities: Optional[Dict[str, "models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None,
+ parameters: "models.ClusterUpdate",
**kwargs
) -> AsyncLROPoller["models.Cluster"]:
"""Update a Kusto cluster.
@@ -396,41 +302,8 @@ async def begin_update(
:type resource_group_name: str
:param cluster_name: The name of the Kusto cluster.
:type cluster_name: str
- :param tags: Resource tags.
- :type tags: dict[str, str]
- :param location: Resource location.
- :type location: str
- :param sku: The SKU of the cluster.
- :type sku: ~kusto_management_client.models.AzureSku
- :param trusted_external_tenants: The cluster's external tenants.
- :type trusted_external_tenants: list[~kusto_management_client.models.TrustedExternalTenant]
- :param optimized_autoscale: Optimized auto scale definition.
- :type optimized_autoscale: ~kusto_management_client.models.OptimizedAutoscale
- :param enable_disk_encryption: A boolean value that indicates if the cluster's disks are
- encrypted.
- :type enable_disk_encryption: bool
- :param enable_streaming_ingest: A boolean value that indicates if the streaming ingest is
- enabled.
- :type enable_streaming_ingest: bool
- :param virtual_network_configuration: Virtual network definition.
- :type virtual_network_configuration: ~kusto_management_client.models.VirtualNetworkConfiguration
- :param key_vault_properties: KeyVault properties for the cluster encryption.
- :type key_vault_properties: ~kusto_management_client.models.KeyVaultProperties
- :param enable_purge: A boolean value that indicates if the purge operations are enabled.
- :type enable_purge: bool
- :param enable_double_encryption: A boolean value that indicates if double encryption is
- enabled.
- :type enable_double_encryption: bool
- :param engine_type: The engine type.
- :type engine_type: str or ~kusto_management_client.models.EngineType
- :param type: The type of managed identity used. The type 'SystemAssigned, UserAssigned'
- includes both an implicitly created identity and a set of user-assigned identities. The type
- 'None' will remove all identities.
- :type type: str or ~kusto_management_client.models.IdentityType
- :param user_assigned_identities: The list of user identities associated with the Kusto cluster.
- The user identity dictionary key references will be ARM resource ids in the form:
- '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- :type user_assigned_identities: dict[str, ~kusto_management_client.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties]
+ :param parameters: The Kusto cluster parameters supplied to the Update operation.
+ :type parameters: ~kusto_management_client.models.ClusterUpdate
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -452,20 +325,7 @@ async def begin_update(
raw_result = await self._update_initial(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
- tags=tags,
- location=location,
- sku=sku,
- trusted_external_tenants=trusted_external_tenants,
- optimized_autoscale=optimized_autoscale,
- enable_disk_encryption=enable_disk_encryption,
- enable_streaming_ingest=enable_streaming_ingest,
- virtual_network_configuration=virtual_network_configuration,
- key_vault_properties=key_vault_properties,
- enable_purge=enable_purge,
- enable_double_encryption=enable_double_encryption,
- engine_type=engine_type,
- type=type,
- user_assigned_identities=user_assigned_identities,
+ parameters=parameters,
cls=lambda x,y,z: x,
**kwargs
)
@@ -480,7 +340,13 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -501,9 +367,12 @@ async def _delete_initial(
**kwargs
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
@@ -520,6 +389,7 @@ async def _delete_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -578,7 +448,13 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -599,9 +475,12 @@ async def _stop_initial(
**kwargs
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._stop_initial.metadata['url'] # type: ignore
@@ -618,6 +497,7 @@ async def _stop_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -676,7 +556,13 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -697,9 +583,12 @@ async def _start_initial(
**kwargs
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._start_initial.metadata['url'] # type: ignore
@@ -716,6 +605,7 @@ async def _start_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -774,7 +664,13 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -788,7 +684,7 @@ def get_long_running_output(pipeline_response):
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/start'} # type: ignore
- def list_follower_database(
+ def list_follower_databases(
self,
resource_group_name: str,
cluster_name: str,
@@ -807,18 +703,21 @@ def list_follower_database(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.FollowerDatabaseListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
- url = self.list_follower_database.metadata['url'] # type: ignore
+ url = self.list_follower_databases.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
@@ -858,26 +757,26 @@ async def get_next(next_link=None):
return AsyncItemPaged(
get_next, extract_data
)
- list_follower_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases'} # type: ignore
+ list_follower_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases'} # type: ignore
- async def _detach_follower_database_initial(
+ async def _detach_follower_databases_initial(
self,
resource_group_name: str,
cluster_name: str,
- cluster_resource_id: str,
- attached_database_configuration_name: str,
+ follower_database_to_remove: "models.FollowerDatabaseDefinition",
**kwargs
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- follower_database_to_remove = models.FollowerDatabaseDefinition(cluster_resource_id=cluster_resource_id, attached_database_configuration_name=attached_database_configuration_name)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
- url = self._detach_follower_database_initial.metadata['url'] # type: ignore
+ url = self._detach_follower_databases_initial.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
@@ -892,12 +791,12 @@ async def _detach_follower_database_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(follower_database_to_remove, 'FollowerDatabaseDefinition')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -908,14 +807,13 @@ async def _detach_follower_database_initial(
if cls:
return cls(pipeline_response, None, {})
- _detach_follower_database_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases'} # type: ignore
+ _detach_follower_databases_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases'} # type: ignore
- async def begin_detach_follower_database(
+ async def begin_detach_follower_databases(
self,
resource_group_name: str,
cluster_name: str,
- cluster_resource_id: str,
- attached_database_configuration_name: str,
+ follower_database_to_remove: "models.FollowerDatabaseDefinition",
**kwargs
) -> AsyncLROPoller[None]:
"""Detaches all followers of a database owned by this cluster.
@@ -924,12 +822,8 @@ async def begin_detach_follower_database(
:type resource_group_name: str
:param cluster_name: The name of the Kusto cluster.
:type cluster_name: str
- :param cluster_resource_id: Resource id of the cluster that follows a database owned by this
- cluster.
- :type cluster_resource_id: str
- :param attached_database_configuration_name: Resource name of the attached database
- configuration in the follower cluster.
- :type attached_database_configuration_name: str
+ :param follower_database_to_remove: The follower databases properties to remove.
+ :type follower_database_to_remove: ~kusto_management_client.models.FollowerDatabaseDefinition
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -948,11 +842,10 @@ async def begin_detach_follower_database(
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
- raw_result = await self._detach_follower_database_initial(
+ raw_result = await self._detach_follower_databases_initial(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
- cluster_resource_id=cluster_resource_id,
- attached_database_configuration_name=attached_database_configuration_name,
+ follower_database_to_remove=follower_database_to_remove,
cls=lambda x,y,z: x,
**kwargs
)
@@ -964,7 +857,13 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -976,7 +875,7 @@ def get_long_running_output(pipeline_response):
)
else:
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
- begin_detach_follower_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases'} # type: ignore
+ begin_detach_follower_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases'} # type: ignore
async def _diagnose_virtual_network_initial(
self,
@@ -985,9 +884,12 @@ async def _diagnose_virtual_network_initial(
**kwargs
) -> Optional["models.DiagnoseVirtualNetworkResult"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.DiagnoseVirtualNetworkResult"]]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._diagnose_virtual_network_initial.metadata['url'] # type: ignore
@@ -1004,7 +906,7 @@ async def _diagnose_virtual_network_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -1072,7 +974,13 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -1101,14 +1009,17 @@ def list_by_resource_group(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
@@ -1165,14 +1076,17 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
@@ -1216,7 +1130,7 @@ async def get_next(next_link=None):
)
list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/clusters'} # type: ignore
- def list_sku(
+ def list_skus(
self,
**kwargs
) -> AsyncIterable["models.SkuDescriptionList"]:
@@ -1228,18 +1142,21 @@ def list_sku(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.SkuDescriptionList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
- url = self.list_sku.metadata['url'] # type: ignore
+ url = self.list_skus.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
@@ -1277,35 +1194,33 @@ async def get_next(next_link=None):
return AsyncItemPaged(
get_next, extract_data
)
- list_sku.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/skus'} # type: ignore
+ list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/skus'} # type: ignore
async def check_name_availability(
self,
location: str,
- name: str,
- type: Union[str, "models.Type"],
+ cluster_name: "models.ClusterCheckNameRequest",
**kwargs
) -> "models.CheckNameResult":
"""Checks that the cluster name is valid and is not already in use.
:param location: Azure location.
:type location: str
- :param name: Cluster name.
- :type name: str
- :param type: The type of resource, Microsoft.Kusto/clusters.
- :type type: str or ~kusto_management_client.models.Type
+ :param cluster_name: The name of the cluster.
+ :type cluster_name: ~kusto_management_client.models.ClusterCheckNameRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:return: CheckNameResult, or the result of cls(response)
:rtype: ~kusto_management_client.models.CheckNameResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- cluster_name = models.ClusterCheckNameRequest(name=name, type=type)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.check_name_availability.metadata['url'] # type: ignore
@@ -1322,13 +1237,12 @@ async def check_name_availability(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(cluster_name, 'ClusterCheckNameRequest')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -1344,7 +1258,7 @@ async def check_name_availability(
return deserialized
check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/checkNameAvailability'} # type: ignore
- def list_sku_by_resource(
+ def list_skus_by_resource(
self,
resource_group_name: str,
cluster_name: str,
@@ -1362,18 +1276,21 @@ def list_sku_by_resource(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ListResourceSkusResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
- url = self.list_sku_by_resource.metadata['url'] # type: ignore
+ url = self.list_skus_by_resource.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
@@ -1413,9 +1330,9 @@ async def get_next(next_link=None):
return AsyncItemPaged(
get_next, extract_data
)
- list_sku_by_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/skus'} # type: ignore
+ list_skus_by_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/skus'} # type: ignore
- def list_language_extension(
+ def list_language_extensions(
self,
resource_group_name: str,
cluster_name: str,
@@ -1433,18 +1350,21 @@ def list_language_extension(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.LanguageExtensionsList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
- url = self.list_language_extension.metadata['url'] # type: ignore
+ url = self.list_language_extensions.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
@@ -1484,25 +1404,26 @@ async def get_next(next_link=None):
return AsyncItemPaged(
get_next, extract_data
)
- list_language_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listLanguageExtensions'} # type: ignore
+ list_language_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listLanguageExtensions'} # type: ignore
- async def _add_language_extension_initial(
+ async def _add_language_extensions_initial(
self,
resource_group_name: str,
cluster_name: str,
- value: Optional[List["models.LanguageExtension"]] = None,
+ language_extensions_to_add: "models.LanguageExtensionsList",
**kwargs
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- language_extensions_to_add = models.LanguageExtensionsList(value=value)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
- url = self._add_language_extension_initial.metadata['url'] # type: ignore
+ url = self._add_language_extensions_initial.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
@@ -1517,12 +1438,12 @@ async def _add_language_extension_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(language_extensions_to_add, 'LanguageExtensionsList')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -1533,13 +1454,13 @@ async def _add_language_extension_initial(
if cls:
return cls(pipeline_response, None, {})
- _add_language_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addLanguageExtensions'} # type: ignore
+ _add_language_extensions_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addLanguageExtensions'} # type: ignore
- async def begin_add_language_extension(
+ async def begin_add_language_extensions(
self,
resource_group_name: str,
cluster_name: str,
- value: Optional[List["models.LanguageExtension"]] = None,
+ language_extensions_to_add: "models.LanguageExtensionsList",
**kwargs
) -> AsyncLROPoller[None]:
"""Add a list of language extensions that can run within KQL queries.
@@ -1548,8 +1469,8 @@ async def begin_add_language_extension(
:type resource_group_name: str
:param cluster_name: The name of the Kusto cluster.
:type cluster_name: str
- :param value: The list of language extensions.
- :type value: list[~kusto_management_client.models.LanguageExtension]
+ :param language_extensions_to_add: The language extensions to add.
+ :type language_extensions_to_add: ~kusto_management_client.models.LanguageExtensionsList
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -1568,10 +1489,10 @@ async def begin_add_language_extension(
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
- raw_result = await self._add_language_extension_initial(
+ raw_result = await self._add_language_extensions_initial(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
- value=value,
+ language_extensions_to_add=language_extensions_to_add,
cls=lambda x,y,z: x,
**kwargs
)
@@ -1583,7 +1504,13 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -1595,25 +1522,26 @@ def get_long_running_output(pipeline_response):
)
else:
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
- begin_add_language_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addLanguageExtensions'} # type: ignore
+ begin_add_language_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addLanguageExtensions'} # type: ignore
- async def _remove_language_extension_initial(
+ async def _remove_language_extensions_initial(
self,
resource_group_name: str,
cluster_name: str,
- value: Optional[List["models.LanguageExtension"]] = None,
+ language_extensions_to_remove: "models.LanguageExtensionsList",
**kwargs
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- language_extensions_to_remove = models.LanguageExtensionsList(value=value)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
- url = self._remove_language_extension_initial.metadata['url'] # type: ignore
+ url = self._remove_language_extensions_initial.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
@@ -1628,12 +1556,12 @@ async def _remove_language_extension_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(language_extensions_to_remove, 'LanguageExtensionsList')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -1644,13 +1572,13 @@ async def _remove_language_extension_initial(
if cls:
return cls(pipeline_response, None, {})
- _remove_language_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeLanguageExtensions'} # type: ignore
+ _remove_language_extensions_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeLanguageExtensions'} # type: ignore
- async def begin_remove_language_extension(
+ async def begin_remove_language_extensions(
self,
resource_group_name: str,
cluster_name: str,
- value: Optional[List["models.LanguageExtension"]] = None,
+ language_extensions_to_remove: "models.LanguageExtensionsList",
**kwargs
) -> AsyncLROPoller[None]:
"""Remove a list of language extensions that can run within KQL queries.
@@ -1659,8 +1587,8 @@ async def begin_remove_language_extension(
:type resource_group_name: str
:param cluster_name: The name of the Kusto cluster.
:type cluster_name: str
- :param value: The list of language extensions.
- :type value: list[~kusto_management_client.models.LanguageExtension]
+ :param language_extensions_to_remove: The language extensions to remove.
+ :type language_extensions_to_remove: ~kusto_management_client.models.LanguageExtensionsList
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -1679,10 +1607,10 @@ async def begin_remove_language_extension(
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
- raw_result = await self._remove_language_extension_initial(
+ raw_result = await self._remove_language_extensions_initial(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
- value=value,
+ language_extensions_to_remove=language_extensions_to_remove,
cls=lambda x,y,z: x,
**kwargs
)
@@ -1694,7 +1622,13 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -1706,4 +1640,4 @@ def get_long_running_output(pipeline_response):
)
else:
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
- begin_remove_language_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeLanguageExtensions'} # type: ignore
+ begin_remove_language_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeLanguageExtensions'} # type: ignore
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_data_connection_operations_async.py b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_data_connections_operations.py
similarity index 88%
rename from src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_data_connection_operations_async.py
rename to src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_data_connections_operations.py
index 1bbd91d4625..63fcaf0db53 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_data_connection_operations_async.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_data_connections_operations.py
@@ -9,7 +9,7 @@
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
@@ -21,8 +21,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
-class DataConnectionOperations:
- """DataConnectionOperations async operations.
+class DataConnectionsOperations:
+ """DataConnectionsOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
@@ -64,14 +64,17 @@ def list_by_database(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DataConnectionListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
@@ -123,17 +126,17 @@ async def _data_connection_validation_initial(
resource_group_name: str,
cluster_name: str,
database_name: str,
- data_connection_name: Optional[str] = None,
- properties: Optional["models.DataConnection"] = None,
+ parameters: "models.DataConnectionValidation",
**kwargs
) -> Optional["models.DataConnectionValidationListResult"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.DataConnectionValidationListResult"]]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- parameters = models.DataConnectionValidation(data_connection_name=data_connection_name, properties=properties)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._data_connection_validation_initial.metadata['url'] # type: ignore
@@ -152,13 +155,12 @@ async def _data_connection_validation_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'DataConnectionValidation')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -181,8 +183,7 @@ async def begin_data_connection_validation(
resource_group_name: str,
cluster_name: str,
database_name: str,
- data_connection_name: Optional[str] = None,
- properties: Optional["models.DataConnection"] = None,
+ parameters: "models.DataConnectionValidation",
**kwargs
) -> AsyncLROPoller["models.DataConnectionValidationListResult"]:
"""Checks that the data connection parameters are valid.
@@ -193,10 +194,8 @@ async def begin_data_connection_validation(
:type cluster_name: str
:param database_name: The name of the database in the Kusto cluster.
:type database_name: str
- :param data_connection_name: The name of the data connection.
- :type data_connection_name: str
- :param properties: The data connection properties to validate.
- :type properties: ~kusto_management_client.models.DataConnection
+ :param parameters: The data connection parameters supplied to the CreateOrUpdate operation.
+ :type parameters: ~kusto_management_client.models.DataConnectionValidation
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -219,8 +218,7 @@ async def begin_data_connection_validation(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
database_name=database_name,
- data_connection_name=data_connection_name,
- properties=properties,
+ parameters=parameters,
cls=lambda x,y,z: x,
**kwargs
)
@@ -235,7 +233,14 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs)
+ 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'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -254,8 +259,7 @@ async def check_name_availability(
resource_group_name: str,
cluster_name: str,
database_name: str,
- name: str,
- type: Union[str, "models.Type"],
+ data_connection_name: "models.DataConnectionCheckNameRequest",
**kwargs
) -> "models.CheckNameResult":
"""Checks that the data connection name is valid and is not already in use.
@@ -266,22 +270,21 @@ async def check_name_availability(
:type cluster_name: str
:param database_name: The name of the database in the Kusto cluster.
:type database_name: str
- :param name: Data Connection name.
- :type name: str
- :param type: The type of resource, Microsoft.Kusto/clusters/databases/dataConnections.
- :type type: str or ~kusto_management_client.models.Type
+ :param data_connection_name: The name of the data connection.
+ :type data_connection_name: ~kusto_management_client.models.DataConnectionCheckNameRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:return: CheckNameResult, or the result of cls(response)
:rtype: ~kusto_management_client.models.CheckNameResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- data_connection_name = models.DataConnectionCheckNameRequest(name=name, type=type)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.check_name_availability.metadata['url'] # type: ignore
@@ -300,13 +303,12 @@ async def check_name_availability(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(data_connection_name, 'DataConnectionCheckNameRequest')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -346,9 +348,12 @@ async def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DataConnection"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -367,7 +372,7 @@ async def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -395,10 +400,13 @@ async def _create_or_update_initial(
**kwargs
) -> "models.DataConnection":
cls = kwargs.pop('cls', None) # type: ClsType["models.DataConnection"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._create_or_update_initial.metadata['url'] # type: ignore
@@ -418,13 +426,12 @@ async def _create_or_update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'DataConnection')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -506,7 +513,15 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ 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'),
+ 'dataConnectionName': self._serialize.url("data_connection_name", data_connection_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -530,10 +545,13 @@ async def _update_initial(
**kwargs
) -> "models.DataConnection":
cls = kwargs.pop('cls', None) # type: ClsType["models.DataConnection"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._update_initial.metadata['url'] # type: ignore
@@ -553,13 +571,12 @@ async def _update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'DataConnection')
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -641,7 +658,15 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ 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'),
+ 'dataConnectionName': self._serialize.url("data_connection_name", data_connection_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -664,9 +689,12 @@ async def _delete_initial(
**kwargs
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
@@ -685,6 +713,7 @@ async def _delete_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -751,7 +780,15 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ 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'),
+ 'dataConnectionName': self._serialize.url("data_connection_name", data_connection_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_database_principal_assignment_operations_async.py b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_database_principal_assignments_operations.py
similarity index 87%
rename from src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_database_principal_assignment_operations_async.py
rename to src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_database_principal_assignments_operations.py
index b638a75b983..666a7a23acd 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_database_principal_assignment_operations_async.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_database_principal_assignments_operations.py
@@ -9,7 +9,7 @@
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
@@ -21,8 +21,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
-class DatabasePrincipalAssignmentOperations:
- """DatabasePrincipalAssignmentOperations async operations.
+class DatabasePrincipalAssignmentsOperations:
+ """DatabasePrincipalAssignmentsOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
@@ -48,8 +48,7 @@ async def check_name_availability(
resource_group_name: str,
cluster_name: str,
database_name: str,
- name: str,
- type: Union[str, "models.Type"],
+ principal_assignment_name: "models.DatabasePrincipalAssignmentCheckNameRequest",
**kwargs
) -> "models.CheckNameResult":
"""Checks that the database principal assignment is valid and is not already in use.
@@ -60,22 +59,21 @@ async def check_name_availability(
:type cluster_name: str
:param database_name: The name of the database in the Kusto cluster.
:type database_name: str
- :param name: Principal Assignment resource name.
- :type name: str
- :param type: The type of resource, Microsoft.Kusto/clusters/databases/principalAssignments.
- :type type: str or ~kusto_management_client.models.Type
+ :param principal_assignment_name: The name of the resource.
+ :type principal_assignment_name: ~kusto_management_client.models.DatabasePrincipalAssignmentCheckNameRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:return: CheckNameResult, or the result of cls(response)
:rtype: ~kusto_management_client.models.CheckNameResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- principal_assignment_name = models.DatabasePrincipalAssignmentCheckNameRequest(name=name, type=type)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.check_name_availability.metadata['url'] # type: ignore
@@ -94,13 +92,12 @@ async def check_name_availability(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(principal_assignment_name, 'DatabasePrincipalAssignmentCheckNameRequest')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -140,9 +137,12 @@ async def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DatabasePrincipalAssignment"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -161,7 +161,7 @@ async def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -185,19 +185,17 @@ async def _create_or_update_initial(
cluster_name: str,
database_name: str,
principal_assignment_name: str,
- principal_id: Optional[str] = None,
- role: Optional[Union[str, "models.DatabasePrincipalRole"]] = None,
- tenant_id: Optional[str] = None,
- principal_type: Optional[Union[str, "models.PrincipalType"]] = None,
+ parameters: "models.DatabasePrincipalAssignment",
**kwargs
) -> "models.DatabasePrincipalAssignment":
cls = kwargs.pop('cls', None) # type: ClsType["models.DatabasePrincipalAssignment"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- parameters = models.DatabasePrincipalAssignment(principal_id=principal_id, role=role, tenant_id=tenant_id, principal_type=principal_type)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._create_or_update_initial.metadata['url'] # type: ignore
@@ -217,13 +215,12 @@ async def _create_or_update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'DatabasePrincipalAssignment')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -249,10 +246,7 @@ async def begin_create_or_update(
cluster_name: str,
database_name: str,
principal_assignment_name: str,
- principal_id: Optional[str] = None,
- role: Optional[Union[str, "models.DatabasePrincipalRole"]] = None,
- tenant_id: Optional[str] = None,
- principal_type: Optional[Union[str, "models.PrincipalType"]] = None,
+ parameters: "models.DatabasePrincipalAssignment",
**kwargs
) -> AsyncLROPoller["models.DatabasePrincipalAssignment"]:
"""Creates a Kusto cluster database principalAssignment.
@@ -265,15 +259,8 @@ async def begin_create_or_update(
:type database_name: str
:param principal_assignment_name: The name of the Kusto principalAssignment.
:type principal_assignment_name: str
- :param principal_id: The principal ID assigned to the database principal. It can be a user
- email, application ID, or security group name.
- :type principal_id: str
- :param role: Database principal role.
- :type role: str or ~kusto_management_client.models.DatabasePrincipalRole
- :param tenant_id: The tenant id of the principal.
- :type tenant_id: str
- :param principal_type: Principal type.
- :type principal_type: str or ~kusto_management_client.models.PrincipalType
+ :param parameters: The Kusto principalAssignments parameters supplied for the operation.
+ :type parameters: ~kusto_management_client.models.DatabasePrincipalAssignment
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -297,10 +284,7 @@ async def begin_create_or_update(
cluster_name=cluster_name,
database_name=database_name,
principal_assignment_name=principal_assignment_name,
- principal_id=principal_id,
- role=role,
- tenant_id=tenant_id,
- principal_type=principal_type,
+ parameters=parameters,
cls=lambda x,y,z: x,
**kwargs
)
@@ -315,7 +299,15 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ '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'),
+ 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -338,9 +330,12 @@ async def _delete_initial(
**kwargs
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
@@ -359,6 +354,7 @@ async def _delete_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -425,7 +421,15 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ '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'),
+ 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -460,14 +464,17 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DatabasePrincipalAssignmentListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_database_operations_async.py b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_databases_operations.py
similarity index 86%
rename from src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_database_operations_async.py
rename to src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_databases_operations.py
index ed5527a0154..61ecce6e3fe 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_database_operations_async.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_databases_operations.py
@@ -5,11 +5,11 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union
+from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
@@ -21,8 +21,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
-class DatabaseOperations:
- """DatabaseOperations async operations.
+class DatabasesOperations:
+ """DatabasesOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
@@ -47,8 +47,7 @@ async def check_name_availability(
self,
resource_group_name: str,
cluster_name: str,
- name: str,
- type: Union[str, "models.Type"],
+ resource_name: "models.CheckNameRequest",
**kwargs
) -> "models.CheckNameResult":
"""Checks that the database name is valid and is not already in use.
@@ -57,22 +56,21 @@ async def check_name_availability(
:type resource_group_name: str
:param cluster_name: The name of the Kusto cluster.
:type cluster_name: str
- :param name: Resource name.
- :type name: str
- :param type: The type of resource, for instance Microsoft.Kusto/clusters/databases.
- :type type: str or ~kusto_management_client.models.Type
+ :param resource_name: The name of the resource.
+ :type resource_name: ~kusto_management_client.models.CheckNameRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:return: CheckNameResult, or the result of cls(response)
:rtype: ~kusto_management_client.models.CheckNameResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- resource_name = models.CheckNameRequest(name=name, type=type)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.check_name_availability.metadata['url'] # type: ignore
@@ -90,13 +88,12 @@ async def check_name_availability(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(resource_name, 'CheckNameRequest')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -130,14 +127,17 @@ def list_by_cluster(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
@@ -204,9 +204,12 @@ async def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Database"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -224,7 +227,7 @@ async def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -251,10 +254,13 @@ async def _create_or_update_initial(
**kwargs
) -> "models.Database":
cls = kwargs.pop('cls', None) # type: ClsType["models.Database"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._create_or_update_initial.metadata['url'] # type: ignore
@@ -273,13 +279,12 @@ async def _create_or_update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'Database')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -357,7 +362,14 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ 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'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -380,10 +392,13 @@ async def _update_initial(
**kwargs
) -> "models.Database":
cls = kwargs.pop('cls', None) # type: ClsType["models.Database"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._update_initial.metadata['url'] # type: ignore
@@ -402,13 +417,12 @@ async def _update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'Database')
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -486,7 +500,14 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ 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'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -508,9 +529,12 @@ async def _delete_initial(
**kwargs
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
@@ -528,6 +552,7 @@ async def _delete_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -590,7 +615,14 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ 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'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -604,7 +636,7 @@ def get_long_running_output(pipeline_response):
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}'} # type: ignore
- def list_principal(
+ def list_principals(
self,
resource_group_name: str,
cluster_name: str,
@@ -625,18 +657,21 @@ def list_principal(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DatabasePrincipalListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
- url = self.list_principal.metadata['url'] # type: ignore
+ url = self.list_principals.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
@@ -677,14 +712,14 @@ async def get_next(next_link=None):
return AsyncItemPaged(
get_next, extract_data
)
- list_principal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/listPrincipals'} # type: ignore
+ list_principals.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/listPrincipals'} # type: ignore
- async def add_principal(
+ async def add_principals(
self,
resource_group_name: str,
cluster_name: str,
database_name: str,
- value: Optional[List["models.DatabasePrincipal"]] = None,
+ database_principals_to_add: "models.DatabasePrincipalListRequest",
**kwargs
) -> "models.DatabasePrincipalListResult":
"""Add Database principals permissions.
@@ -695,23 +730,24 @@ async def add_principal(
: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[~kusto_management_client.models.DatabasePrincipal]
+ :param database_principals_to_add: List of database principals to add.
+ :type database_principals_to_add: ~kusto_management_client.models.DatabasePrincipalListRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:return: DatabasePrincipalListResult, or the result of cls(response)
:rtype: ~kusto_management_client.models.DatabasePrincipalListResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DatabasePrincipalListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- database_principals_to_add = models.DatabasePrincipalListRequest(value=value)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
- url = self.add_principal.metadata['url'] # type: ignore
+ url = self.add_principals.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
@@ -727,13 +763,12 @@ async def add_principal(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(database_principals_to_add, 'DatabasePrincipalListRequest')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -747,14 +782,14 @@ async def add_principal(
return cls(pipeline_response, deserialized, {})
return deserialized
- add_principal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/addPrincipals'} # type: ignore
+ add_principals.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/addPrincipals'} # type: ignore
- async def remove_principal(
+ async def remove_principals(
self,
resource_group_name: str,
cluster_name: str,
database_name: str,
- value: Optional[List["models.DatabasePrincipal"]] = None,
+ database_principals_to_remove: "models.DatabasePrincipalListRequest",
**kwargs
) -> "models.DatabasePrincipalListResult":
"""Remove Database principals permissions.
@@ -765,23 +800,24 @@ async def remove_principal(
: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[~kusto_management_client.models.DatabasePrincipal]
+ :param database_principals_to_remove: List of database principals to remove.
+ :type database_principals_to_remove: ~kusto_management_client.models.DatabasePrincipalListRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:return: DatabasePrincipalListResult, or the result of cls(response)
:rtype: ~kusto_management_client.models.DatabasePrincipalListResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DatabasePrincipalListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- database_principals_to_remove = models.DatabasePrincipalListRequest(value=value)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
- url = self.remove_principal.metadata['url'] # type: ignore
+ url = self.remove_principals.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
@@ -797,13 +833,12 @@ async def remove_principal(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(database_principals_to_remove, 'DatabasePrincipalListRequest')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -817,4 +852,4 @@ async def remove_principal(
return cls(pipeline_response, deserialized, {})
return deserialized
- remove_principal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/removePrincipals'} # type: ignore
+ remove_principals.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/removePrincipals'} # type: ignore
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_operation_operations_async.py b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_operations.py
similarity index 90%
rename from src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_operation_operations_async.py
rename to src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_operations.py
index 58c61b55688..dffc003cdf4 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/_operation_operations_async.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations/_operations.py
@@ -9,7 +9,7 @@
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat
@@ -19,8 +19,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
-class OperationOperations:
- """OperationOperations async operations.
+class Operations:
+ """Operations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
@@ -53,14 +53,17 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/__init__.py b/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/__init__.py
deleted file mode 100644
index e173d033126..00000000000
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/aio/operations_async/__init__.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# coding=utf-8
-# --------------------------------------------------------------------------
-# Copyright (c) Microsoft Corporation. All rights reserved.
-# Licensed under the MIT License. See License.txt in the project root for license information.
-# Code generated by Microsoft (R) AutoRest Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from ._cluster_operations_async import ClusterOperations
-from ._cluster_principal_assignment_operations_async import ClusterPrincipalAssignmentOperations
-from ._database_operations_async import DatabaseOperations
-from ._database_principal_assignment_operations_async import DatabasePrincipalAssignmentOperations
-from ._attached_database_configuration_operations_async import AttachedDatabaseConfigurationOperations
-from ._data_connection_operations_async import DataConnectionOperations
-from ._operation_operations_async import OperationOperations
-
-__all__ = [
- 'ClusterOperations',
- 'ClusterPrincipalAssignmentOperations',
- 'DatabaseOperations',
- 'DatabasePrincipalAssignmentOperations',
- 'AttachedDatabaseConfigurationOperations',
- 'DataConnectionOperations',
- 'OperationOperations',
-]
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/models/__init__.py b/src/kusto/azext_kusto/vendored_sdks/kusto/models/__init__.py
index 02927ce5b6a..4bad7da941c 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/models/__init__.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/models/__init__.py
@@ -43,6 +43,7 @@
from ._models_py3 import EventHubDataConnection
from ._models_py3 import FollowerDatabaseDefinition
from ._models_py3 import FollowerDatabaseListResult
+ from ._models_py3 import Identity
from ._models_py3 import IotHubDataConnection
from ._models_py3 import KeyVaultProperties
from ._models_py3 import LanguageExtension
@@ -99,6 +100,7 @@
from ._models import EventHubDataConnection # type: ignore
from ._models import FollowerDatabaseDefinition # type: ignore
from ._models import FollowerDatabaseListResult # type: ignore
+ from ._models import Identity # type: ignore
from ._models import IotHubDataConnection # type: ignore
from ._models import KeyVaultProperties # type: ignore
from ._models import LanguageExtension # type: ignore
@@ -126,6 +128,7 @@
BlobStorageEventType,
ClusterPrincipalRole,
Compression,
+ DataConnectionKind,
DatabasePrincipalRole,
DatabasePrincipalType,
DefaultPrincipalsModificationKind,
@@ -181,6 +184,7 @@
'EventHubDataConnection',
'FollowerDatabaseDefinition',
'FollowerDatabaseListResult',
+ 'Identity',
'IotHubDataConnection',
'KeyVaultProperties',
'LanguageExtension',
@@ -206,6 +210,7 @@
'BlobStorageEventType',
'ClusterPrincipalRole',
'Compression',
+ 'DataConnectionKind',
'DatabasePrincipalRole',
'DatabasePrincipalType',
'DefaultPrincipalsModificationKind',
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/models/_kusto_management_client_enums.py b/src/kusto/azext_kusto/vendored_sdks/kusto/models/_kusto_management_client_enums.py
index 8efc82e774b..103e2cc4b75 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/models/_kusto_management_client_enums.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/models/_kusto_management_client_enums.py
@@ -108,6 +108,14 @@ class DatabasePrincipalType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum))
GROUP = "Group"
USER = "User"
+class DataConnectionKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """Kind of the endpoint for the data connection
+ """
+
+ EVENT_HUB = "EventHub"
+ EVENT_GRID = "EventGrid"
+ IOT_HUB = "IotHub"
+
class DefaultPrincipalsModificationKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""The default principals modification kind
"""
@@ -203,9 +211,6 @@ class Kind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
READ_WRITE = "ReadWrite"
READ_ONLY_FOLLOWING = "ReadOnlyFollowing"
- EVENT_HUB = "EventHub"
- EVENT_GRID = "EventGrid"
- IOT_HUB = "IotHub"
class LanguageExtensionName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""Language extension that can run within KQL query.
@@ -263,12 +268,8 @@ class State(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
UPDATING = "Updating"
class Type(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
- """The type of resource, Microsoft.Kusto/clusters.
+ """The type of resource, for instance Microsoft.Kusto/clusters/databases.
"""
- MICROSOFT_KUSTO_CLUSTERS = "Microsoft.Kusto/clusters"
MICROSOFT_KUSTO_CLUSTERS_DATABASES = "Microsoft.Kusto/clusters/databases"
MICROSOFT_KUSTO_CLUSTERS_ATTACHED_DATABASE_CONFIGURATIONS = "Microsoft.Kusto/clusters/attachedDatabaseConfigurations"
- MICROSOFT_KUSTO_CLUSTERS_PRINCIPAL_ASSIGNMENTS = "Microsoft.Kusto/clusters/principalAssignments"
- MICROSOFT_KUSTO_CLUSTERS_DATABASES_DATA_CONNECTIONS = "Microsoft.Kusto/clusters/databases/dataConnections"
- MICROSOFT_KUSTO_CLUSTERS_DATABASES_PRINCIPAL_ASSIGNMENTS = "Microsoft.Kusto/clusters/databases/principalAssignments"
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/models/_models.py b/src/kusto/azext_kusto/vendored_sdks/kusto/models/_models.py
index 88a7800e03b..27b06eb3c5c 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/models/_models.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/models/_models.py
@@ -10,17 +10,17 @@
class Resource(msrest.serialization.Model):
- """Resource.
+ """Common fields that are returned in the response for all Azure Resource Manager resources.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
"""
@@ -51,13 +51,13 @@ class AttachedDatabaseConfiguration(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param location: Resource location.
:type location: str
@@ -247,11 +247,8 @@ class CheckNameRequest(msrest.serialization.Model):
:param name: Required. Resource name.
:type name: str
:param type: Required. The type of resource, for instance Microsoft.Kusto/clusters/databases.
- Possible values include: "Microsoft.Kusto/clusters", "Microsoft.Kusto/clusters/databases",
- "Microsoft.Kusto/clusters/attachedDatabaseConfigurations",
- "Microsoft.Kusto/clusters/principalAssignments",
- "Microsoft.Kusto/clusters/databases/dataConnections",
- "Microsoft.Kusto/clusters/databases/principalAssignments".
+ Possible values include: "Microsoft.Kusto/clusters/databases",
+ "Microsoft.Kusto/clusters/attachedDatabaseConfigurations".
:type type: str or ~kusto_management_client.models.Type
"""
@@ -342,19 +339,19 @@ def __init__(
class TrackedResource(Resource):
- """The resource model definition for a ARM tracked top level resource.
+ """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
@@ -393,13 +390,13 @@ class Cluster(TrackedResource):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
@@ -409,6 +406,8 @@ class Cluster(TrackedResource):
:type sku: ~kusto_management_client.models.AzureSku
:param zones: The availability zones of the cluster.
:type zones: list[str]
+ :param identity: The identity of the cluster, if configured.
+ :type identity: ~kusto_management_client.models.Identity
:ivar state: The state of the resource. Possible values include: "Creating", "Unavailable",
"Running", "Deleting", "Deleted", "Stopping", "Stopped", "Starting", "Updating".
:vartype state: str or ~kusto_management_client.models.State
@@ -445,20 +444,6 @@ class Cluster(TrackedResource):
:type enable_double_encryption: bool
:param engine_type: The engine type. Possible values include: "V2", "V3".
:type engine_type: str or ~kusto_management_client.models.EngineType
- :ivar principal_id: The principal ID of resource identity.
- :vartype principal_id: str
- :ivar tenant_id: The tenant ID of resource.
- :vartype tenant_id: str
- :param type_identity_type: The type of managed identity used. The type 'SystemAssigned,
- UserAssigned' includes both an implicitly created identity and a set of user-assigned
- identities. The type 'None' will remove all identities. Possible values include: "None",
- "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned".
- :type type_identity_type: str or ~kusto_management_client.models.IdentityType
- :param user_assigned_identities: The list of user identities associated with the Kusto cluster.
- The user identity dictionary key references will be ARM resource ids in the form:
- '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- :type user_assigned_identities: dict[str,
- ~kusto_management_client.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties]
"""
_validation = {
@@ -473,8 +458,6 @@ class Cluster(TrackedResource):
'data_ingestion_uri': {'readonly': True},
'state_reason': {'readonly': True},
'language_extensions': {'readonly': True},
- 'principal_id': {'readonly': True},
- 'tenant_id': {'readonly': True},
}
_attribute_map = {
@@ -485,6 +468,7 @@ class Cluster(TrackedResource):
'location': {'key': 'location', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'AzureSku'},
'zones': {'key': 'zones', 'type': '[str]'},
+ 'identity': {'key': 'identity', 'type': 'Identity'},
'state': {'key': 'properties.state', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'uri': {'key': 'properties.uri', 'type': 'str'},
@@ -500,10 +484,6 @@ class Cluster(TrackedResource):
'language_extensions': {'key': 'properties.languageExtensions', 'type': 'LanguageExtensionsList'},
'enable_double_encryption': {'key': 'properties.enableDoubleEncryption', 'type': 'bool'},
'engine_type': {'key': 'properties.engineType', 'type': 'str'},
- 'principal_id': {'key': 'identity.principalId', 'type': 'str'},
- 'tenant_id': {'key': 'identity.tenantId', 'type': 'str'},
- 'type_identity_type': {'key': 'identity.type', 'type': 'str'},
- 'user_assigned_identities': {'key': 'identity.userAssignedIdentities', 'type': '{ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties}'},
}
def __init__(
@@ -513,6 +493,7 @@ def __init__(
super(Cluster, self).__init__(**kwargs)
self.sku = kwargs['sku']
self.zones = kwargs.get('zones', None)
+ self.identity = kwargs.get('identity', None)
self.state = None
self.provisioning_state = None
self.uri = None
@@ -528,31 +509,25 @@ def __init__(
self.language_extensions = None
self.enable_double_encryption = kwargs.get('enable_double_encryption', False)
self.engine_type = kwargs.get('engine_type', None)
- self.principal_id = None
- self.tenant_id = None
- self.type_identity_type = kwargs.get('type_identity_type', None)
- self.user_assigned_identities = kwargs.get('user_assigned_identities', None)
class ClusterCheckNameRequest(msrest.serialization.Model):
"""The result returned from a cluster check name availability request.
+ Variables are only populated by the server, and will be ignored when sending a request.
+
All required parameters must be populated in order to send to Azure.
:param name: Required. Cluster name.
:type name: str
- :param type: Required. The type of resource, Microsoft.Kusto/clusters. Possible values include:
- "Microsoft.Kusto/clusters", "Microsoft.Kusto/clusters/databases",
- "Microsoft.Kusto/clusters/attachedDatabaseConfigurations",
- "Microsoft.Kusto/clusters/principalAssignments",
- "Microsoft.Kusto/clusters/databases/dataConnections",
- "Microsoft.Kusto/clusters/databases/principalAssignments".
- :type type: str or ~kusto_management_client.models.Type
+ :ivar type: Required. The type of resource, Microsoft.Kusto/clusters. Default value:
+ "Microsoft.Kusto/clusters".
+ :vartype type: str
"""
_validation = {
'name': {'required': True},
- 'type': {'required': True},
+ 'type': {'required': True, 'constant': True},
}
_attribute_map = {
@@ -560,13 +535,14 @@ class ClusterCheckNameRequest(msrest.serialization.Model):
'type': {'key': 'type', 'type': 'str'},
}
+ type = "Microsoft.Kusto/clusters"
+
def __init__(
self,
**kwargs
):
super(ClusterCheckNameRequest, self).__init__(**kwargs)
self.name = kwargs['name']
- self.type = kwargs['type']
class ClusterListResult(msrest.serialization.Model):
@@ -593,13 +569,13 @@ class ClusterPrincipalAssignment(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param principal_id: The principal ID assigned to the cluster principal. It can be a user
email, application ID, or security group name.
@@ -659,22 +635,20 @@ def __init__(
class ClusterPrincipalAssignmentCheckNameRequest(msrest.serialization.Model):
"""A principal assignment check name availability request.
+ Variables are only populated by the server, and will be ignored when sending a request.
+
All required parameters must be populated in order to send to Azure.
:param name: Required. Principal Assignment resource name.
:type name: str
- :param type: Required. The type of resource, Microsoft.Kusto/clusters/principalAssignments.
- Possible values include: "Microsoft.Kusto/clusters", "Microsoft.Kusto/clusters/databases",
- "Microsoft.Kusto/clusters/attachedDatabaseConfigurations",
- "Microsoft.Kusto/clusters/principalAssignments",
- "Microsoft.Kusto/clusters/databases/dataConnections",
- "Microsoft.Kusto/clusters/databases/principalAssignments".
- :type type: str or ~kusto_management_client.models.Type
+ :ivar type: Required. The type of resource, Microsoft.Kusto/clusters/principalAssignments.
+ Default value: "Microsoft.Kusto/clusters/principalAssignments".
+ :vartype type: str
"""
_validation = {
'name': {'required': True},
- 'type': {'required': True},
+ 'type': {'required': True, 'constant': True},
}
_attribute_map = {
@@ -682,13 +656,14 @@ class ClusterPrincipalAssignmentCheckNameRequest(msrest.serialization.Model):
'type': {'key': 'type', 'type': 'str'},
}
+ type = "Microsoft.Kusto/clusters/principalAssignments"
+
def __init__(
self,
**kwargs
):
super(ClusterPrincipalAssignmentCheckNameRequest, self).__init__(**kwargs)
self.name = kwargs['name']
- self.type = kwargs['type']
class ClusterPrincipalAssignmentListResult(msrest.serialization.Model):
@@ -715,13 +690,13 @@ class ClusterUpdate(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
@@ -729,6 +704,8 @@ class ClusterUpdate(Resource):
:type location: str
:param sku: The SKU of the cluster.
:type sku: ~kusto_management_client.models.AzureSku
+ :param identity: The identity of the cluster, if configured.
+ :type identity: ~kusto_management_client.models.Identity
:ivar state: The state of the resource. Possible values include: "Creating", "Unavailable",
"Running", "Deleting", "Deleted", "Stopping", "Stopped", "Starting", "Updating".
:vartype state: str or ~kusto_management_client.models.State
@@ -765,20 +742,6 @@ class ClusterUpdate(Resource):
:type enable_double_encryption: bool
:param engine_type: The engine type. Possible values include: "V2", "V3".
:type engine_type: str or ~kusto_management_client.models.EngineType
- :ivar principal_id: The principal ID of resource identity.
- :vartype principal_id: str
- :ivar tenant_id: The tenant ID of resource.
- :vartype tenant_id: str
- :param type_identity_type: The type of managed identity used. The type 'SystemAssigned,
- UserAssigned' includes both an implicitly created identity and a set of user-assigned
- identities. The type 'None' will remove all identities. Possible values include: "None",
- "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned".
- :type type_identity_type: str or ~kusto_management_client.models.IdentityType
- :param user_assigned_identities: The list of user identities associated with the Kusto cluster.
- The user identity dictionary key references will be ARM resource ids in the form:
- '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- :type user_assigned_identities: dict[str,
- ~kusto_management_client.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties]
"""
_validation = {
@@ -791,8 +754,6 @@ class ClusterUpdate(Resource):
'data_ingestion_uri': {'readonly': True},
'state_reason': {'readonly': True},
'language_extensions': {'readonly': True},
- 'principal_id': {'readonly': True},
- 'tenant_id': {'readonly': True},
}
_attribute_map = {
@@ -802,6 +763,7 @@ class ClusterUpdate(Resource):
'tags': {'key': 'tags', 'type': '{str}'},
'location': {'key': 'location', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'AzureSku'},
+ 'identity': {'key': 'identity', 'type': 'Identity'},
'state': {'key': 'properties.state', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'uri': {'key': 'properties.uri', 'type': 'str'},
@@ -817,10 +779,6 @@ class ClusterUpdate(Resource):
'language_extensions': {'key': 'properties.languageExtensions', 'type': 'LanguageExtensionsList'},
'enable_double_encryption': {'key': 'properties.enableDoubleEncryption', 'type': 'bool'},
'engine_type': {'key': 'properties.engineType', 'type': 'str'},
- 'principal_id': {'key': 'identity.principalId', 'type': 'str'},
- 'tenant_id': {'key': 'identity.tenantId', 'type': 'str'},
- 'type_identity_type': {'key': 'identity.type', 'type': 'str'},
- 'user_assigned_identities': {'key': 'identity.userAssignedIdentities', 'type': '{ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties}'},
}
def __init__(
@@ -831,6 +789,7 @@ def __init__(
self.tags = kwargs.get('tags', None)
self.location = kwargs.get('location', None)
self.sku = kwargs.get('sku', None)
+ self.identity = kwargs.get('identity', None)
self.state = None
self.provisioning_state = None
self.uri = None
@@ -846,10 +805,6 @@ def __init__(
self.language_extensions = None
self.enable_double_encryption = kwargs.get('enable_double_encryption', False)
self.engine_type = kwargs.get('engine_type', None)
- self.principal_id = None
- self.tenant_id = None
- self.type_identity_type = kwargs.get('type_identity_type', None)
- self.user_assigned_identities = kwargs.get('user_assigned_identities', None)
class ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model):
@@ -892,18 +847,18 @@ class Database(Resource):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param location: Resource location.
:type location: str
:param kind: Required. Kind of the database.Constant filled by server. Possible values
- include: "ReadWrite", "ReadOnlyFollowing", "EventHub", "EventGrid", "IotHub".
+ include: "ReadWrite", "ReadOnlyFollowing".
:type kind: str or ~kusto_management_client.models.Kind
"""
@@ -1015,13 +970,13 @@ class DatabasePrincipalAssignment(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param principal_id: The principal ID assigned to the database principal. It can be a user
email, application ID, or security group name.
@@ -1081,23 +1036,21 @@ def __init__(
class DatabasePrincipalAssignmentCheckNameRequest(msrest.serialization.Model):
"""A principal assignment check name availability request.
+ Variables are only populated by the server, and will be ignored when sending a request.
+
All required parameters must be populated in order to send to Azure.
:param name: Required. Principal Assignment resource name.
:type name: str
- :param type: Required. The type of resource,
- Microsoft.Kusto/clusters/databases/principalAssignments. Possible values include:
- "Microsoft.Kusto/clusters", "Microsoft.Kusto/clusters/databases",
- "Microsoft.Kusto/clusters/attachedDatabaseConfigurations",
- "Microsoft.Kusto/clusters/principalAssignments",
- "Microsoft.Kusto/clusters/databases/dataConnections",
+ :ivar type: Required. The type of resource,
+ Microsoft.Kusto/clusters/databases/principalAssignments. Default value:
"Microsoft.Kusto/clusters/databases/principalAssignments".
- :type type: str or ~kusto_management_client.models.Type
+ :vartype type: str
"""
_validation = {
'name': {'required': True},
- 'type': {'required': True},
+ 'type': {'required': True, 'constant': True},
}
_attribute_map = {
@@ -1105,13 +1058,14 @@ class DatabasePrincipalAssignmentCheckNameRequest(msrest.serialization.Model):
'type': {'key': 'type', 'type': 'str'},
}
+ type = "Microsoft.Kusto/clusters/databases/principalAssignments"
+
def __init__(
self,
**kwargs
):
super(DatabasePrincipalAssignmentCheckNameRequest, self).__init__(**kwargs)
self.name = kwargs['name']
- self.type = kwargs['type']
class DatabasePrincipalAssignmentListResult(msrest.serialization.Model):
@@ -1200,19 +1154,19 @@ class DataConnection(Resource):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param location: Resource location.
:type location: str
:param kind: Required. Kind of the endpoint for the data connection.Constant filled by server.
- Possible values include: "ReadWrite", "ReadOnlyFollowing", "EventHub", "EventGrid", "IotHub".
- :type kind: str or ~kusto_management_client.models.Kind
+ Possible values include: "EventHub", "EventGrid", "IotHub".
+ :type kind: str or ~kusto_management_client.models.DataConnectionKind
"""
_validation = {
@@ -1246,23 +1200,20 @@ def __init__(
class DataConnectionCheckNameRequest(msrest.serialization.Model):
"""A data connection check name availability request.
+ Variables are only populated by the server, and will be ignored when sending a request.
+
All required parameters must be populated in order to send to Azure.
:param name: Required. Data Connection name.
:type name: str
- :param type: Required. The type of resource,
- Microsoft.Kusto/clusters/databases/dataConnections. Possible values include:
- "Microsoft.Kusto/clusters", "Microsoft.Kusto/clusters/databases",
- "Microsoft.Kusto/clusters/attachedDatabaseConfigurations",
- "Microsoft.Kusto/clusters/principalAssignments",
- "Microsoft.Kusto/clusters/databases/dataConnections",
- "Microsoft.Kusto/clusters/databases/principalAssignments".
- :type type: str or ~kusto_management_client.models.Type
+ :ivar type: Required. The type of resource, Microsoft.Kusto/clusters/databases/dataConnections.
+ Default value: "Microsoft.Kusto/clusters/databases/dataConnections".
+ :vartype type: str
"""
_validation = {
'name': {'required': True},
- 'type': {'required': True},
+ 'type': {'required': True, 'constant': True},
}
_attribute_map = {
@@ -1270,13 +1221,14 @@ class DataConnectionCheckNameRequest(msrest.serialization.Model):
'type': {'key': 'type', 'type': 'str'},
}
+ type = "Microsoft.Kusto/clusters/databases/dataConnections"
+
def __init__(
self,
**kwargs
):
super(DataConnectionCheckNameRequest, self).__init__(**kwargs)
self.name = kwargs['name']
- self.type = kwargs['type']
class DataConnectionListResult(msrest.serialization.Model):
@@ -1385,19 +1337,19 @@ class EventGridDataConnection(DataConnection):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param location: Resource location.
:type location: str
:param kind: Required. Kind of the endpoint for the data connection.Constant filled by server.
- Possible values include: "ReadWrite", "ReadOnlyFollowing", "EventHub", "EventGrid", "IotHub".
- :type kind: str or ~kusto_management_client.models.Kind
+ Possible values include: "EventHub", "EventGrid", "IotHub".
+ :type kind: str or ~kusto_management_client.models.DataConnectionKind
:param storage_account_resource_id: The resource ID of the storage account where the data
resides.
:type storage_account_resource_id: str
@@ -1477,19 +1429,19 @@ class EventHubDataConnection(DataConnection):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param location: Resource location.
:type location: str
:param kind: Required. Kind of the endpoint for the data connection.Constant filled by server.
- Possible values include: "ReadWrite", "ReadOnlyFollowing", "EventHub", "EventGrid", "IotHub".
- :type kind: str or ~kusto_management_client.models.Kind
+ Possible values include: "EventHub", "EventGrid", "IotHub".
+ :type kind: str or ~kusto_management_client.models.DataConnectionKind
:param event_hub_resource_id: The resource ID of the event hub to be used to create a data
connection.
:type event_hub_resource_id: str
@@ -1615,6 +1567,53 @@ def __init__(
self.value = kwargs.get('value', None)
+class Identity(msrest.serialization.Model):
+ """Identity for the resource.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar principal_id: The principal ID of resource identity.
+ :vartype principal_id: str
+ :ivar tenant_id: The tenant ID of resource.
+ :vartype tenant_id: str
+ :param type: Required. The type of managed identity used. The type 'SystemAssigned,
+ UserAssigned' includes both an implicitly created identity and a set of user-assigned
+ identities. The type 'None' will remove all identities. Possible values include: "None",
+ "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned".
+ :type type: str or ~kusto_management_client.models.IdentityType
+ :param user_assigned_identities: The list of user identities associated with the Kusto cluster.
+ The user identity dictionary key references will be ARM resource ids in the form:
+ '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ :type user_assigned_identities: dict[str,
+ ~kusto_management_client.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties]
+ """
+
+ _validation = {
+ 'principal_id': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ 'type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties}'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(Identity, self).__init__(**kwargs)
+ self.principal_id = None
+ self.tenant_id = None
+ self.type = kwargs['type']
+ self.user_assigned_identities = kwargs.get('user_assigned_identities', None)
+
+
class IotHubDataConnection(DataConnection):
"""Class representing an iot hub data connection.
@@ -1622,19 +1621,19 @@ class IotHubDataConnection(DataConnection):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param location: Resource location.
:type location: str
:param kind: Required. Kind of the endpoint for the data connection.Constant filled by server.
- Possible values include: "ReadWrite", "ReadOnlyFollowing", "EventHub", "EventGrid", "IotHub".
- :type kind: str or ~kusto_management_client.models.Kind
+ Possible values include: "EventHub", "EventGrid", "IotHub".
+ :type kind: str or ~kusto_management_client.models.DataConnectionKind
:param iot_hub_resource_id: The resource ID of the Iot hub to be used to create a data
connection.
:type iot_hub_resource_id: str
@@ -1923,17 +1922,17 @@ def __init__(
class ProxyResource(Resource):
- """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags.
+ """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
"""
@@ -1963,18 +1962,18 @@ class ReadOnlyFollowingDatabase(Database):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param location: Resource location.
:type location: str
:param kind: Required. Kind of the database.Constant filled by server. Possible values
- include: "ReadWrite", "ReadOnlyFollowing", "EventHub", "EventGrid", "IotHub".
+ include: "ReadWrite", "ReadOnlyFollowing".
:type kind: str or ~kusto_management_client.models.Kind
:ivar provisioning_state: The provisioned state of the resource. Possible values include:
"Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving".
@@ -2048,18 +2047,18 @@ class ReadWriteDatabase(Database):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param location: Resource location.
:type location: str
:param kind: Required. Kind of the database.Constant filled by server. Possible values
- include: "ReadWrite", "ReadOnlyFollowing", "EventHub", "EventGrid", "IotHub".
+ include: "ReadWrite", "ReadOnlyFollowing".
:type kind: str or ~kusto_management_client.models.Kind
:ivar provisioning_state: The provisioned state of the resource. Possible values include:
"Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving".
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/models/_models_py3.py b/src/kusto/azext_kusto/vendored_sdks/kusto/models/_models_py3.py
index ff9f5298480..6cc26497db4 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/models/_models_py3.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/models/_models_py3.py
@@ -15,17 +15,17 @@
class Resource(msrest.serialization.Model):
- """Resource.
+ """Common fields that are returned in the response for all Azure Resource Manager resources.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
"""
@@ -56,13 +56,13 @@ class AttachedDatabaseConfiguration(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param location: Resource location.
:type location: str
@@ -272,11 +272,8 @@ class CheckNameRequest(msrest.serialization.Model):
:param name: Required. Resource name.
:type name: str
:param type: Required. The type of resource, for instance Microsoft.Kusto/clusters/databases.
- Possible values include: "Microsoft.Kusto/clusters", "Microsoft.Kusto/clusters/databases",
- "Microsoft.Kusto/clusters/attachedDatabaseConfigurations",
- "Microsoft.Kusto/clusters/principalAssignments",
- "Microsoft.Kusto/clusters/databases/dataConnections",
- "Microsoft.Kusto/clusters/databases/principalAssignments".
+ Possible values include: "Microsoft.Kusto/clusters/databases",
+ "Microsoft.Kusto/clusters/attachedDatabaseConfigurations".
:type type: str or ~kusto_management_client.models.Type
"""
@@ -380,19 +377,19 @@ def __init__(
class TrackedResource(Resource):
- """The resource model definition for a ARM tracked top level resource.
+ """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
@@ -434,13 +431,13 @@ class Cluster(TrackedResource):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
@@ -450,6 +447,8 @@ class Cluster(TrackedResource):
:type sku: ~kusto_management_client.models.AzureSku
:param zones: The availability zones of the cluster.
:type zones: list[str]
+ :param identity: The identity of the cluster, if configured.
+ :type identity: ~kusto_management_client.models.Identity
:ivar state: The state of the resource. Possible values include: "Creating", "Unavailable",
"Running", "Deleting", "Deleted", "Stopping", "Stopped", "Starting", "Updating".
:vartype state: str or ~kusto_management_client.models.State
@@ -486,20 +485,6 @@ class Cluster(TrackedResource):
:type enable_double_encryption: bool
:param engine_type: The engine type. Possible values include: "V2", "V3".
:type engine_type: str or ~kusto_management_client.models.EngineType
- :ivar principal_id: The principal ID of resource identity.
- :vartype principal_id: str
- :ivar tenant_id: The tenant ID of resource.
- :vartype tenant_id: str
- :param type_identity_type: The type of managed identity used. The type 'SystemAssigned,
- UserAssigned' includes both an implicitly created identity and a set of user-assigned
- identities. The type 'None' will remove all identities. Possible values include: "None",
- "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned".
- :type type_identity_type: str or ~kusto_management_client.models.IdentityType
- :param user_assigned_identities: The list of user identities associated with the Kusto cluster.
- The user identity dictionary key references will be ARM resource ids in the form:
- '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- :type user_assigned_identities: dict[str,
- ~kusto_management_client.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties]
"""
_validation = {
@@ -514,8 +499,6 @@ class Cluster(TrackedResource):
'data_ingestion_uri': {'readonly': True},
'state_reason': {'readonly': True},
'language_extensions': {'readonly': True},
- 'principal_id': {'readonly': True},
- 'tenant_id': {'readonly': True},
}
_attribute_map = {
@@ -526,6 +509,7 @@ class Cluster(TrackedResource):
'location': {'key': 'location', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'AzureSku'},
'zones': {'key': 'zones', 'type': '[str]'},
+ 'identity': {'key': 'identity', 'type': 'Identity'},
'state': {'key': 'properties.state', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'uri': {'key': 'properties.uri', 'type': 'str'},
@@ -541,10 +525,6 @@ class Cluster(TrackedResource):
'language_extensions': {'key': 'properties.languageExtensions', 'type': 'LanguageExtensionsList'},
'enable_double_encryption': {'key': 'properties.enableDoubleEncryption', 'type': 'bool'},
'engine_type': {'key': 'properties.engineType', 'type': 'str'},
- 'principal_id': {'key': 'identity.principalId', 'type': 'str'},
- 'tenant_id': {'key': 'identity.tenantId', 'type': 'str'},
- 'type_identity_type': {'key': 'identity.type', 'type': 'str'},
- 'user_assigned_identities': {'key': 'identity.userAssignedIdentities', 'type': '{ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties}'},
}
def __init__(
@@ -554,6 +534,7 @@ def __init__(
sku: "AzureSku",
tags: Optional[Dict[str, str]] = None,
zones: Optional[List[str]] = None,
+ identity: Optional["Identity"] = None,
trusted_external_tenants: Optional[List["TrustedExternalTenant"]] = None,
optimized_autoscale: Optional["OptimizedAutoscale"] = None,
enable_disk_encryption: Optional[bool] = None,
@@ -563,13 +544,12 @@ def __init__(
enable_purge: Optional[bool] = False,
enable_double_encryption: Optional[bool] = False,
engine_type: Optional[Union[str, "EngineType"]] = None,
- type_identity_type: Optional[Union[str, "IdentityType"]] = None,
- user_assigned_identities: Optional[Dict[str, "ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None,
**kwargs
):
super(Cluster, self).__init__(tags=tags, location=location, **kwargs)
self.sku = sku
self.zones = zones
+ self.identity = identity
self.state = None
self.provisioning_state = None
self.uri = None
@@ -585,31 +565,25 @@ def __init__(
self.language_extensions = None
self.enable_double_encryption = enable_double_encryption
self.engine_type = engine_type
- self.principal_id = None
- self.tenant_id = None
- self.type_identity_type = type_identity_type
- self.user_assigned_identities = user_assigned_identities
class ClusterCheckNameRequest(msrest.serialization.Model):
"""The result returned from a cluster check name availability request.
+ Variables are only populated by the server, and will be ignored when sending a request.
+
All required parameters must be populated in order to send to Azure.
:param name: Required. Cluster name.
:type name: str
- :param type: Required. The type of resource, Microsoft.Kusto/clusters. Possible values include:
- "Microsoft.Kusto/clusters", "Microsoft.Kusto/clusters/databases",
- "Microsoft.Kusto/clusters/attachedDatabaseConfigurations",
- "Microsoft.Kusto/clusters/principalAssignments",
- "Microsoft.Kusto/clusters/databases/dataConnections",
- "Microsoft.Kusto/clusters/databases/principalAssignments".
- :type type: str or ~kusto_management_client.models.Type
+ :ivar type: Required. The type of resource, Microsoft.Kusto/clusters. Default value:
+ "Microsoft.Kusto/clusters".
+ :vartype type: str
"""
_validation = {
'name': {'required': True},
- 'type': {'required': True},
+ 'type': {'required': True, 'constant': True},
}
_attribute_map = {
@@ -617,16 +591,16 @@ class ClusterCheckNameRequest(msrest.serialization.Model):
'type': {'key': 'type', 'type': 'str'},
}
+ type = "Microsoft.Kusto/clusters"
+
def __init__(
self,
*,
name: str,
- type: Union[str, "Type"],
**kwargs
):
super(ClusterCheckNameRequest, self).__init__(**kwargs)
self.name = name
- self.type = type
class ClusterListResult(msrest.serialization.Model):
@@ -655,13 +629,13 @@ class ClusterPrincipalAssignment(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param principal_id: The principal ID assigned to the cluster principal. It can be a user
email, application ID, or security group name.
@@ -726,22 +700,20 @@ def __init__(
class ClusterPrincipalAssignmentCheckNameRequest(msrest.serialization.Model):
"""A principal assignment check name availability request.
+ Variables are only populated by the server, and will be ignored when sending a request.
+
All required parameters must be populated in order to send to Azure.
:param name: Required. Principal Assignment resource name.
:type name: str
- :param type: Required. The type of resource, Microsoft.Kusto/clusters/principalAssignments.
- Possible values include: "Microsoft.Kusto/clusters", "Microsoft.Kusto/clusters/databases",
- "Microsoft.Kusto/clusters/attachedDatabaseConfigurations",
- "Microsoft.Kusto/clusters/principalAssignments",
- "Microsoft.Kusto/clusters/databases/dataConnections",
- "Microsoft.Kusto/clusters/databases/principalAssignments".
- :type type: str or ~kusto_management_client.models.Type
+ :ivar type: Required. The type of resource, Microsoft.Kusto/clusters/principalAssignments.
+ Default value: "Microsoft.Kusto/clusters/principalAssignments".
+ :vartype type: str
"""
_validation = {
'name': {'required': True},
- 'type': {'required': True},
+ 'type': {'required': True, 'constant': True},
}
_attribute_map = {
@@ -749,16 +721,16 @@ class ClusterPrincipalAssignmentCheckNameRequest(msrest.serialization.Model):
'type': {'key': 'type', 'type': 'str'},
}
+ type = "Microsoft.Kusto/clusters/principalAssignments"
+
def __init__(
self,
*,
name: str,
- type: Union[str, "Type"],
**kwargs
):
super(ClusterPrincipalAssignmentCheckNameRequest, self).__init__(**kwargs)
self.name = name
- self.type = type
class ClusterPrincipalAssignmentListResult(msrest.serialization.Model):
@@ -787,13 +759,13 @@ class ClusterUpdate(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
@@ -801,6 +773,8 @@ class ClusterUpdate(Resource):
:type location: str
:param sku: The SKU of the cluster.
:type sku: ~kusto_management_client.models.AzureSku
+ :param identity: The identity of the cluster, if configured.
+ :type identity: ~kusto_management_client.models.Identity
:ivar state: The state of the resource. Possible values include: "Creating", "Unavailable",
"Running", "Deleting", "Deleted", "Stopping", "Stopped", "Starting", "Updating".
:vartype state: str or ~kusto_management_client.models.State
@@ -837,20 +811,6 @@ class ClusterUpdate(Resource):
:type enable_double_encryption: bool
:param engine_type: The engine type. Possible values include: "V2", "V3".
:type engine_type: str or ~kusto_management_client.models.EngineType
- :ivar principal_id: The principal ID of resource identity.
- :vartype principal_id: str
- :ivar tenant_id: The tenant ID of resource.
- :vartype tenant_id: str
- :param type_identity_type: The type of managed identity used. The type 'SystemAssigned,
- UserAssigned' includes both an implicitly created identity and a set of user-assigned
- identities. The type 'None' will remove all identities. Possible values include: "None",
- "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned".
- :type type_identity_type: str or ~kusto_management_client.models.IdentityType
- :param user_assigned_identities: The list of user identities associated with the Kusto cluster.
- The user identity dictionary key references will be ARM resource ids in the form:
- '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- :type user_assigned_identities: dict[str,
- ~kusto_management_client.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties]
"""
_validation = {
@@ -863,8 +823,6 @@ class ClusterUpdate(Resource):
'data_ingestion_uri': {'readonly': True},
'state_reason': {'readonly': True},
'language_extensions': {'readonly': True},
- 'principal_id': {'readonly': True},
- 'tenant_id': {'readonly': True},
}
_attribute_map = {
@@ -874,6 +832,7 @@ class ClusterUpdate(Resource):
'tags': {'key': 'tags', 'type': '{str}'},
'location': {'key': 'location', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'AzureSku'},
+ 'identity': {'key': 'identity', 'type': 'Identity'},
'state': {'key': 'properties.state', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'uri': {'key': 'properties.uri', 'type': 'str'},
@@ -889,10 +848,6 @@ class ClusterUpdate(Resource):
'language_extensions': {'key': 'properties.languageExtensions', 'type': 'LanguageExtensionsList'},
'enable_double_encryption': {'key': 'properties.enableDoubleEncryption', 'type': 'bool'},
'engine_type': {'key': 'properties.engineType', 'type': 'str'},
- 'principal_id': {'key': 'identity.principalId', 'type': 'str'},
- 'tenant_id': {'key': 'identity.tenantId', 'type': 'str'},
- 'type_identity_type': {'key': 'identity.type', 'type': 'str'},
- 'user_assigned_identities': {'key': 'identity.userAssignedIdentities', 'type': '{ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties}'},
}
def __init__(
@@ -901,6 +856,7 @@ def __init__(
tags: Optional[Dict[str, str]] = None,
location: Optional[str] = None,
sku: Optional["AzureSku"] = None,
+ identity: Optional["Identity"] = None,
trusted_external_tenants: Optional[List["TrustedExternalTenant"]] = None,
optimized_autoscale: Optional["OptimizedAutoscale"] = None,
enable_disk_encryption: Optional[bool] = None,
@@ -910,14 +866,13 @@ def __init__(
enable_purge: Optional[bool] = False,
enable_double_encryption: Optional[bool] = False,
engine_type: Optional[Union[str, "EngineType"]] = None,
- type_identity_type: Optional[Union[str, "IdentityType"]] = None,
- user_assigned_identities: Optional[Dict[str, "ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None,
**kwargs
):
super(ClusterUpdate, self).__init__(**kwargs)
self.tags = tags
self.location = location
self.sku = sku
+ self.identity = identity
self.state = None
self.provisioning_state = None
self.uri = None
@@ -933,10 +888,6 @@ def __init__(
self.language_extensions = None
self.enable_double_encryption = enable_double_encryption
self.engine_type = engine_type
- self.principal_id = None
- self.tenant_id = None
- self.type_identity_type = type_identity_type
- self.user_assigned_identities = user_assigned_identities
class ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model):
@@ -979,18 +930,18 @@ class Database(Resource):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param location: Resource location.
:type location: str
:param kind: Required. Kind of the database.Constant filled by server. Possible values
- include: "ReadWrite", "ReadOnlyFollowing", "EventHub", "EventGrid", "IotHub".
+ include: "ReadWrite", "ReadOnlyFollowing".
:type kind: str or ~kusto_management_client.models.Kind
"""
@@ -1113,13 +1064,13 @@ class DatabasePrincipalAssignment(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param principal_id: The principal ID assigned to the database principal. It can be a user
email, application ID, or security group name.
@@ -1184,23 +1135,21 @@ def __init__(
class DatabasePrincipalAssignmentCheckNameRequest(msrest.serialization.Model):
"""A principal assignment check name availability request.
+ Variables are only populated by the server, and will be ignored when sending a request.
+
All required parameters must be populated in order to send to Azure.
:param name: Required. Principal Assignment resource name.
:type name: str
- :param type: Required. The type of resource,
- Microsoft.Kusto/clusters/databases/principalAssignments. Possible values include:
- "Microsoft.Kusto/clusters", "Microsoft.Kusto/clusters/databases",
- "Microsoft.Kusto/clusters/attachedDatabaseConfigurations",
- "Microsoft.Kusto/clusters/principalAssignments",
- "Microsoft.Kusto/clusters/databases/dataConnections",
+ :ivar type: Required. The type of resource,
+ Microsoft.Kusto/clusters/databases/principalAssignments. Default value:
"Microsoft.Kusto/clusters/databases/principalAssignments".
- :type type: str or ~kusto_management_client.models.Type
+ :vartype type: str
"""
_validation = {
'name': {'required': True},
- 'type': {'required': True},
+ 'type': {'required': True, 'constant': True},
}
_attribute_map = {
@@ -1208,16 +1157,16 @@ class DatabasePrincipalAssignmentCheckNameRequest(msrest.serialization.Model):
'type': {'key': 'type', 'type': 'str'},
}
+ type = "Microsoft.Kusto/clusters/databases/principalAssignments"
+
def __init__(
self,
*,
name: str,
- type: Union[str, "Type"],
**kwargs
):
super(DatabasePrincipalAssignmentCheckNameRequest, self).__init__(**kwargs)
self.name = name
- self.type = type
class DatabasePrincipalAssignmentListResult(msrest.serialization.Model):
@@ -1314,19 +1263,19 @@ class DataConnection(Resource):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param location: Resource location.
:type location: str
:param kind: Required. Kind of the endpoint for the data connection.Constant filled by server.
- Possible values include: "ReadWrite", "ReadOnlyFollowing", "EventHub", "EventGrid", "IotHub".
- :type kind: str or ~kusto_management_client.models.Kind
+ Possible values include: "EventHub", "EventGrid", "IotHub".
+ :type kind: str or ~kusto_management_client.models.DataConnectionKind
"""
_validation = {
@@ -1362,23 +1311,20 @@ def __init__(
class DataConnectionCheckNameRequest(msrest.serialization.Model):
"""A data connection check name availability request.
+ Variables are only populated by the server, and will be ignored when sending a request.
+
All required parameters must be populated in order to send to Azure.
:param name: Required. Data Connection name.
:type name: str
- :param type: Required. The type of resource,
- Microsoft.Kusto/clusters/databases/dataConnections. Possible values include:
- "Microsoft.Kusto/clusters", "Microsoft.Kusto/clusters/databases",
- "Microsoft.Kusto/clusters/attachedDatabaseConfigurations",
- "Microsoft.Kusto/clusters/principalAssignments",
- "Microsoft.Kusto/clusters/databases/dataConnections",
- "Microsoft.Kusto/clusters/databases/principalAssignments".
- :type type: str or ~kusto_management_client.models.Type
+ :ivar type: Required. The type of resource, Microsoft.Kusto/clusters/databases/dataConnections.
+ Default value: "Microsoft.Kusto/clusters/databases/dataConnections".
+ :vartype type: str
"""
_validation = {
'name': {'required': True},
- 'type': {'required': True},
+ 'type': {'required': True, 'constant': True},
}
_attribute_map = {
@@ -1386,16 +1332,16 @@ class DataConnectionCheckNameRequest(msrest.serialization.Model):
'type': {'key': 'type', 'type': 'str'},
}
+ type = "Microsoft.Kusto/clusters/databases/dataConnections"
+
def __init__(
self,
*,
name: str,
- type: Union[str, "Type"],
**kwargs
):
super(DataConnectionCheckNameRequest, self).__init__(**kwargs)
self.name = name
- self.type = type
class DataConnectionListResult(msrest.serialization.Model):
@@ -1515,19 +1461,19 @@ class EventGridDataConnection(DataConnection):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param location: Resource location.
:type location: str
:param kind: Required. Kind of the endpoint for the data connection.Constant filled by server.
- Possible values include: "ReadWrite", "ReadOnlyFollowing", "EventHub", "EventGrid", "IotHub".
- :type kind: str or ~kusto_management_client.models.Kind
+ Possible values include: "EventHub", "EventGrid", "IotHub".
+ :type kind: str or ~kusto_management_client.models.DataConnectionKind
:param storage_account_resource_id: The resource ID of the storage account where the data
resides.
:type storage_account_resource_id: str
@@ -1617,19 +1563,19 @@ class EventHubDataConnection(DataConnection):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param location: Resource location.
:type location: str
:param kind: Required. Kind of the endpoint for the data connection.Constant filled by server.
- Possible values include: "ReadWrite", "ReadOnlyFollowing", "EventHub", "EventGrid", "IotHub".
- :type kind: str or ~kusto_management_client.models.Kind
+ Possible values include: "EventHub", "EventGrid", "IotHub".
+ :type kind: str or ~kusto_management_client.models.DataConnectionKind
:param event_hub_resource_id: The resource ID of the event hub to be used to create a data
connection.
:type event_hub_resource_id: str
@@ -1769,6 +1715,56 @@ def __init__(
self.value = value
+class Identity(msrest.serialization.Model):
+ """Identity for the resource.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar principal_id: The principal ID of resource identity.
+ :vartype principal_id: str
+ :ivar tenant_id: The tenant ID of resource.
+ :vartype tenant_id: str
+ :param type: Required. The type of managed identity used. The type 'SystemAssigned,
+ UserAssigned' includes both an implicitly created identity and a set of user-assigned
+ identities. The type 'None' will remove all identities. Possible values include: "None",
+ "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned".
+ :type type: str or ~kusto_management_client.models.IdentityType
+ :param user_assigned_identities: The list of user identities associated with the Kusto cluster.
+ The user identity dictionary key references will be ARM resource ids in the form:
+ '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ :type user_assigned_identities: dict[str,
+ ~kusto_management_client.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties]
+ """
+
+ _validation = {
+ 'principal_id': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ 'type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties}'},
+ }
+
+ def __init__(
+ self,
+ *,
+ type: Union[str, "IdentityType"],
+ user_assigned_identities: Optional[Dict[str, "ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None,
+ **kwargs
+ ):
+ super(Identity, self).__init__(**kwargs)
+ self.principal_id = None
+ self.tenant_id = None
+ self.type = type
+ self.user_assigned_identities = user_assigned_identities
+
+
class IotHubDataConnection(DataConnection):
"""Class representing an iot hub data connection.
@@ -1776,19 +1772,19 @@ class IotHubDataConnection(DataConnection):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param location: Resource location.
:type location: str
:param kind: Required. Kind of the endpoint for the data connection.Constant filled by server.
- Possible values include: "ReadWrite", "ReadOnlyFollowing", "EventHub", "EventGrid", "IotHub".
- :type kind: str or ~kusto_management_client.models.Kind
+ Possible values include: "EventHub", "EventGrid", "IotHub".
+ :type kind: str or ~kusto_management_client.models.DataConnectionKind
:param iot_hub_resource_id: The resource ID of the Iot hub to be used to create a data
connection.
:type iot_hub_resource_id: str
@@ -2115,17 +2111,17 @@ def __init__(
class ProxyResource(Resource):
- """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags.
+ """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
"""
@@ -2155,18 +2151,18 @@ class ReadOnlyFollowingDatabase(Database):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param location: Resource location.
:type location: str
:param kind: Required. Kind of the database.Constant filled by server. Possible values
- include: "ReadWrite", "ReadOnlyFollowing", "EventHub", "EventGrid", "IotHub".
+ include: "ReadWrite", "ReadOnlyFollowing".
:type kind: str or ~kusto_management_client.models.Kind
:ivar provisioning_state: The provisioned state of the resource. Possible values include:
"Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving".
@@ -2243,18 +2239,18 @@ class ReadWriteDatabase(Database):
All required parameters must be populated in order to send to Azure.
- :ivar id: Fully qualified resource Id for the resource. Ex -
+ :ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or
- Microsoft.Storage/storageAccounts.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
:param location: Resource location.
:type location: str
:param kind: Required. Kind of the database.Constant filled by server. Possible values
- include: "ReadWrite", "ReadOnlyFollowing", "EventHub", "EventGrid", "IotHub".
+ include: "ReadWrite", "ReadOnlyFollowing".
:type kind: str or ~kusto_management_client.models.Kind
:ivar provisioning_state: The provisioned state of the resource. Possible values include:
"Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving".
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/operations/__init__.py b/src/kusto/azext_kusto/vendored_sdks/kusto/operations/__init__.py
index 5750cdc82c5..fb6fa595386 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/operations/__init__.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/operations/__init__.py
@@ -6,20 +6,20 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from ._cluster_operations import ClusterOperations
-from ._cluster_principal_assignment_operations import ClusterPrincipalAssignmentOperations
-from ._database_operations import DatabaseOperations
-from ._database_principal_assignment_operations import DatabasePrincipalAssignmentOperations
-from ._attached_database_configuration_operations import AttachedDatabaseConfigurationOperations
-from ._data_connection_operations import DataConnectionOperations
-from ._operation_operations import OperationOperations
+from ._clusters_operations import ClustersOperations
+from ._cluster_principal_assignments_operations import ClusterPrincipalAssignmentsOperations
+from ._databases_operations import DatabasesOperations
+from ._database_principal_assignments_operations import DatabasePrincipalAssignmentsOperations
+from ._attached_database_configurations_operations import AttachedDatabaseConfigurationsOperations
+from ._data_connections_operations import DataConnectionsOperations
+from ._operations import Operations
__all__ = [
- 'ClusterOperations',
- 'ClusterPrincipalAssignmentOperations',
- 'DatabaseOperations',
- 'DatabasePrincipalAssignmentOperations',
- 'AttachedDatabaseConfigurationOperations',
- 'DataConnectionOperations',
- 'OperationOperations',
+ 'ClustersOperations',
+ 'ClusterPrincipalAssignmentsOperations',
+ 'DatabasesOperations',
+ 'DatabasePrincipalAssignmentsOperations',
+ 'AttachedDatabaseConfigurationsOperations',
+ 'DataConnectionsOperations',
+ 'Operations',
]
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_attached_database_configuration_operations.py b/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_attached_database_configurations_operations.py
similarity index 88%
rename from src/kusto/azext_kusto/vendored_sdks/kusto/operations/_attached_database_configuration_operations.py
rename to src/kusto/azext_kusto/vendored_sdks/kusto/operations/_attached_database_configurations_operations.py
index 91fe3f6c4b9..ab2d8fbb5ea 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_attached_database_configuration_operations.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_attached_database_configurations_operations.py
@@ -8,7 +8,7 @@
from typing import TYPE_CHECKING
import warnings
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
@@ -25,8 +25,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
-class AttachedDatabaseConfigurationOperations(object):
- """AttachedDatabaseConfigurationOperations operations.
+class AttachedDatabaseConfigurationsOperations(object):
+ """AttachedDatabaseConfigurationsOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
@@ -66,14 +66,17 @@ def list_by_cluster(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.AttachedDatabaseConfigurationListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
@@ -141,9 +144,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.AttachedDatabaseConfiguration"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -161,7 +167,7 @@ def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
@@ -184,20 +190,18 @@ def _create_or_update_initial(
resource_group_name, # type: str
cluster_name, # type: str
attached_database_configuration_name, # type: str
- location=None, # type: Optional[str]
- database_name=None, # type: Optional[str]
- cluster_resource_id=None, # type: Optional[str]
- default_principals_modification_kind=None, # type: Optional[Union[str, "models.DefaultPrincipalsModificationKind"]]
+ parameters, # type: "models.AttachedDatabaseConfiguration"
**kwargs # type: Any
):
# type: (...) -> "models.AttachedDatabaseConfiguration"
cls = kwargs.pop('cls', None) # type: ClsType["models.AttachedDatabaseConfiguration"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- parameters = models.AttachedDatabaseConfiguration(location=location, database_name=database_name, cluster_resource_id=cluster_resource_id, default_principals_modification_kind=default_principals_modification_kind)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._create_or_update_initial.metadata['url'] # type: ignore
@@ -216,13 +220,12 @@ def _create_or_update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'AttachedDatabaseConfiguration')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -250,10 +253,7 @@ def begin_create_or_update(
resource_group_name, # type: str
cluster_name, # type: str
attached_database_configuration_name, # type: str
- location=None, # type: Optional[str]
- database_name=None, # type: Optional[str]
- cluster_resource_id=None, # type: Optional[str]
- default_principals_modification_kind=None, # type: Optional[Union[str, "models.DefaultPrincipalsModificationKind"]]
+ parameters, # type: "models.AttachedDatabaseConfiguration"
**kwargs # type: Any
):
# type: (...) -> LROPoller["models.AttachedDatabaseConfiguration"]
@@ -265,16 +265,8 @@ def begin_create_or_update(
:type cluster_name: str
:param attached_database_configuration_name: The name of the attached database configuration.
:type attached_database_configuration_name: str
- :param location: Resource location.
- :type location: str
- :param database_name: The name of the database which you would like to attach, use * if you
- want to follow all current and future databases.
- :type database_name: str
- :param cluster_resource_id: The resource id of the cluster where the databases you would like
- to attach reside.
- :type cluster_resource_id: str
- :param default_principals_modification_kind: The default principals modification kind.
- :type default_principals_modification_kind: str or ~kusto_management_client.models.DefaultPrincipalsModificationKind
+ :param parameters: The database parameters supplied to the CreateOrUpdate operation.
+ :type parameters: ~kusto_management_client.models.AttachedDatabaseConfiguration
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -297,10 +289,7 @@ def begin_create_or_update(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
attached_database_configuration_name=attached_database_configuration_name,
- location=location,
- database_name=database_name,
- cluster_resource_id=cluster_resource_id,
- default_principals_modification_kind=default_principals_modification_kind,
+ parameters=parameters,
cls=lambda x,y,z: x,
**kwargs
)
@@ -315,7 +304,14 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'attachedDatabaseConfigurationName': self._serialize.url("attached_database_configuration_name", attached_database_configuration_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -338,9 +334,12 @@ def _delete_initial(
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
@@ -358,6 +357,7 @@ def _delete_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
@@ -421,7 +421,14 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'attachedDatabaseConfigurationName': self._serialize.url("attached_database_configuration_name", attached_database_configuration_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_cluster_principal_assignment_operations.py b/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_cluster_principal_assignments_operations.py
similarity index 87%
rename from src/kusto/azext_kusto/vendored_sdks/kusto/operations/_cluster_principal_assignment_operations.py
rename to src/kusto/azext_kusto/vendored_sdks/kusto/operations/_cluster_principal_assignments_operations.py
index f1b4b0f2f82..2a17ee72b71 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_cluster_principal_assignment_operations.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_cluster_principal_assignments_operations.py
@@ -8,7 +8,7 @@
from typing import TYPE_CHECKING
import warnings
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
@@ -25,8 +25,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
-class ClusterPrincipalAssignmentOperations(object):
- """ClusterPrincipalAssignmentOperations operations.
+class ClusterPrincipalAssignmentsOperations(object):
+ """ClusterPrincipalAssignmentsOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
@@ -51,8 +51,7 @@ def check_name_availability(
self,
resource_group_name, # type: str
cluster_name, # type: str
- name, # type: str
- type, # type: Union[str, "models.Type"]
+ principal_assignment_name, # type: "models.ClusterPrincipalAssignmentCheckNameRequest"
**kwargs # type: Any
):
# type: (...) -> "models.CheckNameResult"
@@ -62,22 +61,21 @@ def check_name_availability(
:type resource_group_name: str
:param cluster_name: The name of the Kusto cluster.
:type cluster_name: str
- :param name: Principal Assignment resource name.
- :type name: str
- :param type: The type of resource, Microsoft.Kusto/clusters/principalAssignments.
- :type type: str or ~kusto_management_client.models.Type
+ :param principal_assignment_name: The name of the principal assignment.
+ :type principal_assignment_name: ~kusto_management_client.models.ClusterPrincipalAssignmentCheckNameRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:return: CheckNameResult, or the result of cls(response)
:rtype: ~kusto_management_client.models.CheckNameResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- principal_assignment_name = models.ClusterPrincipalAssignmentCheckNameRequest(name=name, type=type)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.check_name_availability.metadata['url'] # type: ignore
@@ -95,13 +93,12 @@ def check_name_availability(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(principal_assignment_name, 'ClusterPrincipalAssignmentCheckNameRequest')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -139,9 +136,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterPrincipalAssignment"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -159,7 +159,7 @@ def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
@@ -182,20 +182,18 @@ def _create_or_update_initial(
resource_group_name, # type: str
cluster_name, # type: str
principal_assignment_name, # type: str
- principal_id=None, # type: Optional[str]
- role=None, # type: Optional[Union[str, "models.ClusterPrincipalRole"]]
- tenant_id=None, # type: Optional[str]
- principal_type=None, # type: Optional[Union[str, "models.PrincipalType"]]
+ parameters, # type: "models.ClusterPrincipalAssignment"
**kwargs # type: Any
):
# type: (...) -> "models.ClusterPrincipalAssignment"
cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterPrincipalAssignment"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- parameters = models.ClusterPrincipalAssignment(principal_id=principal_id, role=role, tenant_id=tenant_id, principal_type=principal_type)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._create_or_update_initial.metadata['url'] # type: ignore
@@ -214,13 +212,12 @@ def _create_or_update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'ClusterPrincipalAssignment')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -245,10 +242,7 @@ def begin_create_or_update(
resource_group_name, # type: str
cluster_name, # type: str
principal_assignment_name, # type: str
- principal_id=None, # type: Optional[str]
- role=None, # type: Optional[Union[str, "models.ClusterPrincipalRole"]]
- tenant_id=None, # type: Optional[str]
- principal_type=None, # type: Optional[Union[str, "models.PrincipalType"]]
+ parameters, # type: "models.ClusterPrincipalAssignment"
**kwargs # type: Any
):
# type: (...) -> LROPoller["models.ClusterPrincipalAssignment"]
@@ -260,15 +254,9 @@ def begin_create_or_update(
:type cluster_name: str
:param principal_assignment_name: The name of the Kusto principalAssignment.
:type principal_assignment_name: str
- :param principal_id: The principal ID assigned to the cluster principal. It can be a user
- email, application ID, or security group name.
- :type principal_id: str
- :param role: Cluster principal role.
- :type role: str or ~kusto_management_client.models.ClusterPrincipalRole
- :param tenant_id: The tenant id of the principal.
- :type tenant_id: str
- :param principal_type: Principal type.
- :type principal_type: str or ~kusto_management_client.models.PrincipalType
+ :param parameters: The Kusto cluster principalAssignment's parameters supplied for the
+ operation.
+ :type parameters: ~kusto_management_client.models.ClusterPrincipalAssignment
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -291,10 +279,7 @@ def begin_create_or_update(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
principal_assignment_name=principal_assignment_name,
- principal_id=principal_id,
- role=role,
- tenant_id=tenant_id,
- principal_type=principal_type,
+ parameters=parameters,
cls=lambda x,y,z: x,
**kwargs
)
@@ -309,7 +294,14 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -332,9 +324,12 @@ def _delete_initial(
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
@@ -352,6 +347,7 @@ def _delete_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
@@ -415,7 +411,14 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -448,14 +451,17 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterPrincipalAssignmentListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_cluster_operations.py b/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_clusters_operations.py
similarity index 78%
rename from src/kusto/azext_kusto/vendored_sdks/kusto/operations/_cluster_operations.py
rename to src/kusto/azext_kusto/vendored_sdks/kusto/operations/_clusters_operations.py
index 526a1efd086..7aca25002d3 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_cluster_operations.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_clusters_operations.py
@@ -8,7 +8,7 @@
from typing import TYPE_CHECKING
import warnings
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
@@ -20,13 +20,13 @@
if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
- from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union
+ from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
-class ClusterOperations(object):
- """ClusterOperations operations.
+class ClustersOperations(object):
+ """ClustersOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
@@ -66,9 +66,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Cluster"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -85,7 +88,7 @@ def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
@@ -107,31 +110,18 @@ def _create_or_update_initial(
self,
resource_group_name, # type: str
cluster_name, # type: str
- location, # type: str
- sku, # type: "models.AzureSku"
- tags=None, # type: Optional[Dict[str, str]]
- zones=None, # type: Optional[List[str]]
- trusted_external_tenants=None, # type: Optional[List["models.TrustedExternalTenant"]]
- optimized_autoscale=None, # type: Optional["models.OptimizedAutoscale"]
- enable_disk_encryption=None, # type: Optional[bool]
- enable_streaming_ingest=False, # type: Optional[bool]
- virtual_network_configuration=None, # type: Optional["models.VirtualNetworkConfiguration"]
- key_vault_properties=None, # type: Optional["models.KeyVaultProperties"]
- enable_purge=False, # type: Optional[bool]
- enable_double_encryption=False, # type: Optional[bool]
- engine_type=None, # type: Optional[Union[str, "models.EngineType"]]
- type=None, # type: Optional[Union[str, "models.IdentityType"]]
- user_assigned_identities=None, # type: Optional[Dict[str, "models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties"]]
+ parameters, # type: "models.Cluster"
**kwargs # type: Any
):
# type: (...) -> "models.Cluster"
cls = kwargs.pop('cls', None) # type: ClsType["models.Cluster"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- parameters = models.Cluster(tags=tags, location=location, sku=sku, zones=zones, trusted_external_tenants=trusted_external_tenants, optimized_autoscale=optimized_autoscale, enable_disk_encryption=enable_disk_encryption, enable_streaming_ingest=enable_streaming_ingest, virtual_network_configuration=virtual_network_configuration, key_vault_properties=key_vault_properties, enable_purge=enable_purge, enable_double_encryption=enable_double_encryption, engine_type=engine_type, type_identity_type=type, user_assigned_identities=user_assigned_identities)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._create_or_update_initial.metadata['url'] # type: ignore
@@ -149,13 +139,12 @@ def _create_or_update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'Cluster')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -179,21 +168,7 @@ def begin_create_or_update(
self,
resource_group_name, # type: str
cluster_name, # type: str
- location, # type: str
- sku, # type: "models.AzureSku"
- tags=None, # type: Optional[Dict[str, str]]
- zones=None, # type: Optional[List[str]]
- trusted_external_tenants=None, # type: Optional[List["models.TrustedExternalTenant"]]
- optimized_autoscale=None, # type: Optional["models.OptimizedAutoscale"]
- enable_disk_encryption=None, # type: Optional[bool]
- enable_streaming_ingest=False, # type: Optional[bool]
- virtual_network_configuration=None, # type: Optional["models.VirtualNetworkConfiguration"]
- key_vault_properties=None, # type: Optional["models.KeyVaultProperties"]
- enable_purge=False, # type: Optional[bool]
- enable_double_encryption=False, # type: Optional[bool]
- engine_type=None, # type: Optional[Union[str, "models.EngineType"]]
- type=None, # type: Optional[Union[str, "models.IdentityType"]]
- user_assigned_identities=None, # type: Optional[Dict[str, "models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties"]]
+ parameters, # type: "models.Cluster"
**kwargs # type: Any
):
# type: (...) -> LROPoller["models.Cluster"]
@@ -203,43 +178,8 @@ def begin_create_or_update(
:type resource_group_name: str
:param cluster_name: The name of the Kusto cluster.
:type cluster_name: str
- :param location: The geo-location where the resource lives.
- :type location: str
- :param sku: The SKU of the cluster.
- :type sku: ~kusto_management_client.models.AzureSku
- :param tags: Resource tags.
- :type tags: dict[str, str]
- :param zones: The availability zones of the cluster.
- :type zones: list[str]
- :param trusted_external_tenants: The cluster's external tenants.
- :type trusted_external_tenants: list[~kusto_management_client.models.TrustedExternalTenant]
- :param optimized_autoscale: Optimized auto scale definition.
- :type optimized_autoscale: ~kusto_management_client.models.OptimizedAutoscale
- :param enable_disk_encryption: A boolean value that indicates if the cluster's disks are
- encrypted.
- :type enable_disk_encryption: bool
- :param enable_streaming_ingest: A boolean value that indicates if the streaming ingest is
- enabled.
- :type enable_streaming_ingest: bool
- :param virtual_network_configuration: Virtual network definition.
- :type virtual_network_configuration: ~kusto_management_client.models.VirtualNetworkConfiguration
- :param key_vault_properties: KeyVault properties for the cluster encryption.
- :type key_vault_properties: ~kusto_management_client.models.KeyVaultProperties
- :param enable_purge: A boolean value that indicates if the purge operations are enabled.
- :type enable_purge: bool
- :param enable_double_encryption: A boolean value that indicates if double encryption is
- enabled.
- :type enable_double_encryption: bool
- :param engine_type: The engine type.
- :type engine_type: str or ~kusto_management_client.models.EngineType
- :param type: The type of managed identity used. The type 'SystemAssigned, UserAssigned'
- includes both an implicitly created identity and a set of user-assigned identities. The type
- 'None' will remove all identities.
- :type type: str or ~kusto_management_client.models.IdentityType
- :param user_assigned_identities: The list of user identities associated with the Kusto cluster.
- The user identity dictionary key references will be ARM resource ids in the form:
- '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- :type user_assigned_identities: dict[str, ~kusto_management_client.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties]
+ :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation.
+ :type parameters: ~kusto_management_client.models.Cluster
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -261,21 +201,7 @@ def begin_create_or_update(
raw_result = self._create_or_update_initial(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
- location=location,
- sku=sku,
- tags=tags,
- zones=zones,
- trusted_external_tenants=trusted_external_tenants,
- optimized_autoscale=optimized_autoscale,
- enable_disk_encryption=enable_disk_encryption,
- enable_streaming_ingest=enable_streaming_ingest,
- virtual_network_configuration=virtual_network_configuration,
- key_vault_properties=key_vault_properties,
- enable_purge=enable_purge,
- enable_double_encryption=enable_double_encryption,
- engine_type=engine_type,
- type=type,
- user_assigned_identities=user_assigned_identities,
+ parameters=parameters,
cls=lambda x,y,z: x,
**kwargs
)
@@ -290,7 +216,13 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -308,30 +240,18 @@ def _update_initial(
self,
resource_group_name, # type: str
cluster_name, # type: str
- tags=None, # type: Optional[Dict[str, str]]
- location=None, # type: Optional[str]
- sku=None, # type: Optional["models.AzureSku"]
- trusted_external_tenants=None, # type: Optional[List["models.TrustedExternalTenant"]]
- optimized_autoscale=None, # type: Optional["models.OptimizedAutoscale"]
- enable_disk_encryption=None, # type: Optional[bool]
- enable_streaming_ingest=False, # type: Optional[bool]
- virtual_network_configuration=None, # type: Optional["models.VirtualNetworkConfiguration"]
- key_vault_properties=None, # type: Optional["models.KeyVaultProperties"]
- enable_purge=False, # type: Optional[bool]
- enable_double_encryption=False, # type: Optional[bool]
- engine_type=None, # type: Optional[Union[str, "models.EngineType"]]
- type=None, # type: Optional[Union[str, "models.IdentityType"]]
- user_assigned_identities=None, # type: Optional[Dict[str, "models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties"]]
+ parameters, # type: "models.ClusterUpdate"
**kwargs # type: Any
):
# type: (...) -> "models.Cluster"
cls = kwargs.pop('cls', None) # type: ClsType["models.Cluster"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- parameters = models.ClusterUpdate(tags=tags, location=location, sku=sku, trusted_external_tenants=trusted_external_tenants, optimized_autoscale=optimized_autoscale, enable_disk_encryption=enable_disk_encryption, enable_streaming_ingest=enable_streaming_ingest, virtual_network_configuration=virtual_network_configuration, key_vault_properties=key_vault_properties, enable_purge=enable_purge, enable_double_encryption=enable_double_encryption, engine_type=engine_type, type_identity_type=type, user_assigned_identities=user_assigned_identities)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._update_initial.metadata['url'] # type: ignore
@@ -349,13 +269,12 @@ def _update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'ClusterUpdate')
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -382,20 +301,7 @@ def begin_update(
self,
resource_group_name, # type: str
cluster_name, # type: str
- tags=None, # type: Optional[Dict[str, str]]
- location=None, # type: Optional[str]
- sku=None, # type: Optional["models.AzureSku"]
- trusted_external_tenants=None, # type: Optional[List["models.TrustedExternalTenant"]]
- optimized_autoscale=None, # type: Optional["models.OptimizedAutoscale"]
- enable_disk_encryption=None, # type: Optional[bool]
- enable_streaming_ingest=False, # type: Optional[bool]
- virtual_network_configuration=None, # type: Optional["models.VirtualNetworkConfiguration"]
- key_vault_properties=None, # type: Optional["models.KeyVaultProperties"]
- enable_purge=False, # type: Optional[bool]
- enable_double_encryption=False, # type: Optional[bool]
- engine_type=None, # type: Optional[Union[str, "models.EngineType"]]
- type=None, # type: Optional[Union[str, "models.IdentityType"]]
- user_assigned_identities=None, # type: Optional[Dict[str, "models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties"]]
+ parameters, # type: "models.ClusterUpdate"
**kwargs # type: Any
):
# type: (...) -> LROPoller["models.Cluster"]
@@ -405,41 +311,8 @@ def begin_update(
:type resource_group_name: str
:param cluster_name: The name of the Kusto cluster.
:type cluster_name: str
- :param tags: Resource tags.
- :type tags: dict[str, str]
- :param location: Resource location.
- :type location: str
- :param sku: The SKU of the cluster.
- :type sku: ~kusto_management_client.models.AzureSku
- :param trusted_external_tenants: The cluster's external tenants.
- :type trusted_external_tenants: list[~kusto_management_client.models.TrustedExternalTenant]
- :param optimized_autoscale: Optimized auto scale definition.
- :type optimized_autoscale: ~kusto_management_client.models.OptimizedAutoscale
- :param enable_disk_encryption: A boolean value that indicates if the cluster's disks are
- encrypted.
- :type enable_disk_encryption: bool
- :param enable_streaming_ingest: A boolean value that indicates if the streaming ingest is
- enabled.
- :type enable_streaming_ingest: bool
- :param virtual_network_configuration: Virtual network definition.
- :type virtual_network_configuration: ~kusto_management_client.models.VirtualNetworkConfiguration
- :param key_vault_properties: KeyVault properties for the cluster encryption.
- :type key_vault_properties: ~kusto_management_client.models.KeyVaultProperties
- :param enable_purge: A boolean value that indicates if the purge operations are enabled.
- :type enable_purge: bool
- :param enable_double_encryption: A boolean value that indicates if double encryption is
- enabled.
- :type enable_double_encryption: bool
- :param engine_type: The engine type.
- :type engine_type: str or ~kusto_management_client.models.EngineType
- :param type: The type of managed identity used. The type 'SystemAssigned, UserAssigned'
- includes both an implicitly created identity and a set of user-assigned identities. The type
- 'None' will remove all identities.
- :type type: str or ~kusto_management_client.models.IdentityType
- :param user_assigned_identities: The list of user identities associated with the Kusto cluster.
- The user identity dictionary key references will be ARM resource ids in the form:
- '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- :type user_assigned_identities: dict[str, ~kusto_management_client.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties]
+ :param parameters: The Kusto cluster parameters supplied to the Update operation.
+ :type parameters: ~kusto_management_client.models.ClusterUpdate
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -461,20 +334,7 @@ def begin_update(
raw_result = self._update_initial(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
- tags=tags,
- location=location,
- sku=sku,
- trusted_external_tenants=trusted_external_tenants,
- optimized_autoscale=optimized_autoscale,
- enable_disk_encryption=enable_disk_encryption,
- enable_streaming_ingest=enable_streaming_ingest,
- virtual_network_configuration=virtual_network_configuration,
- key_vault_properties=key_vault_properties,
- enable_purge=enable_purge,
- enable_double_encryption=enable_double_encryption,
- engine_type=engine_type,
- type=type,
- user_assigned_identities=user_assigned_identities,
+ parameters=parameters,
cls=lambda x,y,z: x,
**kwargs
)
@@ -489,7 +349,13 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -511,9 +377,12 @@ def _delete_initial(
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
@@ -530,6 +399,7 @@ def _delete_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
@@ -589,7 +459,13 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -611,9 +487,12 @@ def _stop_initial(
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._stop_initial.metadata['url'] # type: ignore
@@ -630,6 +509,7 @@ def _stop_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
@@ -689,7 +569,13 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -711,9 +597,12 @@ def _start_initial(
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._start_initial.metadata['url'] # type: ignore
@@ -730,6 +619,7 @@ def _start_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
@@ -789,7 +679,13 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -803,7 +699,7 @@ def get_long_running_output(pipeline_response):
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/start'} # type: ignore
- def list_follower_database(
+ def list_follower_databases(
self,
resource_group_name, # type: str
cluster_name, # type: str
@@ -823,18 +719,21 @@ def list_follower_database(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.FollowerDatabaseListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
- url = self.list_follower_database.metadata['url'] # type: ignore
+ url = self.list_follower_databases.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
@@ -874,27 +773,27 @@ def get_next(next_link=None):
return ItemPaged(
get_next, extract_data
)
- list_follower_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases'} # type: ignore
+ list_follower_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases'} # type: ignore
- def _detach_follower_database_initial(
+ def _detach_follower_databases_initial(
self,
resource_group_name, # type: str
cluster_name, # type: str
- cluster_resource_id, # type: str
- attached_database_configuration_name, # type: str
+ follower_database_to_remove, # type: "models.FollowerDatabaseDefinition"
**kwargs # type: Any
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- follower_database_to_remove = models.FollowerDatabaseDefinition(cluster_resource_id=cluster_resource_id, attached_database_configuration_name=attached_database_configuration_name)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
- url = self._detach_follower_database_initial.metadata['url'] # type: ignore
+ url = self._detach_follower_databases_initial.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
@@ -909,12 +808,12 @@ def _detach_follower_database_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(follower_database_to_remove, 'FollowerDatabaseDefinition')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -925,14 +824,13 @@ def _detach_follower_database_initial(
if cls:
return cls(pipeline_response, None, {})
- _detach_follower_database_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases'} # type: ignore
+ _detach_follower_databases_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases'} # type: ignore
- def begin_detach_follower_database(
+ def begin_detach_follower_databases(
self,
resource_group_name, # type: str
cluster_name, # type: str
- cluster_resource_id, # type: str
- attached_database_configuration_name, # type: str
+ follower_database_to_remove, # type: "models.FollowerDatabaseDefinition"
**kwargs # type: Any
):
# type: (...) -> LROPoller[None]
@@ -942,12 +840,8 @@ def begin_detach_follower_database(
:type resource_group_name: str
:param cluster_name: The name of the Kusto cluster.
:type cluster_name: str
- :param cluster_resource_id: Resource id of the cluster that follows a database owned by this
- cluster.
- :type cluster_resource_id: str
- :param attached_database_configuration_name: Resource name of the attached database
- configuration in the follower cluster.
- :type attached_database_configuration_name: str
+ :param follower_database_to_remove: The follower databases properties to remove.
+ :type follower_database_to_remove: ~kusto_management_client.models.FollowerDatabaseDefinition
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -966,11 +860,10 @@ def begin_detach_follower_database(
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
- raw_result = self._detach_follower_database_initial(
+ raw_result = self._detach_follower_databases_initial(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
- cluster_resource_id=cluster_resource_id,
- attached_database_configuration_name=attached_database_configuration_name,
+ follower_database_to_remove=follower_database_to_remove,
cls=lambda x,y,z: x,
**kwargs
)
@@ -982,7 +875,13 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -994,7 +893,7 @@ def get_long_running_output(pipeline_response):
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
- begin_detach_follower_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases'} # type: ignore
+ begin_detach_follower_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases'} # type: ignore
def _diagnose_virtual_network_initial(
self,
@@ -1004,9 +903,12 @@ def _diagnose_virtual_network_initial(
):
# type: (...) -> Optional["models.DiagnoseVirtualNetworkResult"]
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.DiagnoseVirtualNetworkResult"]]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._diagnose_virtual_network_initial.metadata['url'] # type: ignore
@@ -1023,7 +925,7 @@ def _diagnose_virtual_network_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
@@ -1092,7 +994,13 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs)
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -1122,14 +1030,17 @@ def list_by_resource_group(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
@@ -1187,14 +1098,17 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
@@ -1238,7 +1152,7 @@ def get_next(next_link=None):
)
list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/clusters'} # type: ignore
- def list_sku(
+ def list_skus(
self,
**kwargs # type: Any
):
@@ -1251,18 +1165,21 @@ def list_sku(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.SkuDescriptionList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
- url = self.list_sku.metadata['url'] # type: ignore
+ url = self.list_skus.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
@@ -1300,13 +1217,12 @@ def get_next(next_link=None):
return ItemPaged(
get_next, extract_data
)
- list_sku.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/skus'} # type: ignore
+ list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/skus'} # type: ignore
def check_name_availability(
self,
location, # type: str
- name, # type: str
- type, # type: Union[str, "models.Type"]
+ cluster_name, # type: "models.ClusterCheckNameRequest"
**kwargs # type: Any
):
# type: (...) -> "models.CheckNameResult"
@@ -1314,22 +1230,21 @@ def check_name_availability(
:param location: Azure location.
:type location: str
- :param name: Cluster name.
- :type name: str
- :param type: The type of resource, Microsoft.Kusto/clusters.
- :type type: str or ~kusto_management_client.models.Type
+ :param cluster_name: The name of the cluster.
+ :type cluster_name: ~kusto_management_client.models.ClusterCheckNameRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:return: CheckNameResult, or the result of cls(response)
:rtype: ~kusto_management_client.models.CheckNameResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- cluster_name = models.ClusterCheckNameRequest(name=name, type=type)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.check_name_availability.metadata['url'] # type: ignore
@@ -1346,13 +1261,12 @@ def check_name_availability(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(cluster_name, 'ClusterCheckNameRequest')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -1368,7 +1282,7 @@ def check_name_availability(
return deserialized
check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/checkNameAvailability'} # type: ignore
- def list_sku_by_resource(
+ def list_skus_by_resource(
self,
resource_group_name, # type: str
cluster_name, # type: str
@@ -1387,18 +1301,21 @@ def list_sku_by_resource(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ListResourceSkusResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
- url = self.list_sku_by_resource.metadata['url'] # type: ignore
+ url = self.list_skus_by_resource.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
@@ -1438,9 +1355,9 @@ def get_next(next_link=None):
return ItemPaged(
get_next, extract_data
)
- list_sku_by_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/skus'} # type: ignore
+ list_skus_by_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/skus'} # type: ignore
- def list_language_extension(
+ def list_language_extensions(
self,
resource_group_name, # type: str
cluster_name, # type: str
@@ -1459,18 +1376,21 @@ def list_language_extension(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.LanguageExtensionsList"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
- url = self.list_language_extension.metadata['url'] # type: ignore
+ url = self.list_language_extensions.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
@@ -1510,26 +1430,27 @@ def get_next(next_link=None):
return ItemPaged(
get_next, extract_data
)
- list_language_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listLanguageExtensions'} # type: ignore
+ list_language_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listLanguageExtensions'} # type: ignore
- def _add_language_extension_initial(
+ def _add_language_extensions_initial(
self,
resource_group_name, # type: str
cluster_name, # type: str
- value=None, # type: Optional[List["models.LanguageExtension"]]
+ language_extensions_to_add, # type: "models.LanguageExtensionsList"
**kwargs # type: Any
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- language_extensions_to_add = models.LanguageExtensionsList(value=value)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
- url = self._add_language_extension_initial.metadata['url'] # type: ignore
+ url = self._add_language_extensions_initial.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
@@ -1544,12 +1465,12 @@ def _add_language_extension_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(language_extensions_to_add, 'LanguageExtensionsList')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -1560,13 +1481,13 @@ def _add_language_extension_initial(
if cls:
return cls(pipeline_response, None, {})
- _add_language_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addLanguageExtensions'} # type: ignore
+ _add_language_extensions_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addLanguageExtensions'} # type: ignore
- def begin_add_language_extension(
+ def begin_add_language_extensions(
self,
resource_group_name, # type: str
cluster_name, # type: str
- value=None, # type: Optional[List["models.LanguageExtension"]]
+ language_extensions_to_add, # type: "models.LanguageExtensionsList"
**kwargs # type: Any
):
# type: (...) -> LROPoller[None]
@@ -1576,8 +1497,8 @@ def begin_add_language_extension(
:type resource_group_name: str
:param cluster_name: The name of the Kusto cluster.
:type cluster_name: str
- :param value: The list of language extensions.
- :type value: list[~kusto_management_client.models.LanguageExtension]
+ :param language_extensions_to_add: The language extensions to add.
+ :type language_extensions_to_add: ~kusto_management_client.models.LanguageExtensionsList
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -1596,10 +1517,10 @@ def begin_add_language_extension(
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
- raw_result = self._add_language_extension_initial(
+ raw_result = self._add_language_extensions_initial(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
- value=value,
+ language_extensions_to_add=language_extensions_to_add,
cls=lambda x,y,z: x,
**kwargs
)
@@ -1611,7 +1532,13 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -1623,26 +1550,27 @@ def get_long_running_output(pipeline_response):
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
- begin_add_language_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addLanguageExtensions'} # type: ignore
+ begin_add_language_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addLanguageExtensions'} # type: ignore
- def _remove_language_extension_initial(
+ def _remove_language_extensions_initial(
self,
resource_group_name, # type: str
cluster_name, # type: str
- value=None, # type: Optional[List["models.LanguageExtension"]]
+ language_extensions_to_remove, # type: "models.LanguageExtensionsList"
**kwargs # type: Any
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- language_extensions_to_remove = models.LanguageExtensionsList(value=value)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
- url = self._remove_language_extension_initial.metadata['url'] # type: ignore
+ url = self._remove_language_extensions_initial.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
@@ -1657,12 +1585,12 @@ def _remove_language_extension_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(language_extensions_to_remove, 'LanguageExtensionsList')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -1673,13 +1601,13 @@ def _remove_language_extension_initial(
if cls:
return cls(pipeline_response, None, {})
- _remove_language_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeLanguageExtensions'} # type: ignore
+ _remove_language_extensions_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeLanguageExtensions'} # type: ignore
- def begin_remove_language_extension(
+ def begin_remove_language_extensions(
self,
resource_group_name, # type: str
cluster_name, # type: str
- value=None, # type: Optional[List["models.LanguageExtension"]]
+ language_extensions_to_remove, # type: "models.LanguageExtensionsList"
**kwargs # type: Any
):
# type: (...) -> LROPoller[None]
@@ -1689,8 +1617,8 @@ def begin_remove_language_extension(
:type resource_group_name: str
:param cluster_name: The name of the Kusto cluster.
:type cluster_name: str
- :param value: The list of language extensions.
- :type value: list[~kusto_management_client.models.LanguageExtension]
+ :param language_extensions_to_remove: The language extensions to remove.
+ :type language_extensions_to_remove: ~kusto_management_client.models.LanguageExtensionsList
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -1709,10 +1637,10 @@ def begin_remove_language_extension(
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
- raw_result = self._remove_language_extension_initial(
+ raw_result = self._remove_language_extensions_initial(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
- value=value,
+ language_extensions_to_remove=language_extensions_to_remove,
cls=lambda x,y,z: x,
**kwargs
)
@@ -1724,7 +1652,13 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -1736,4 +1670,4 @@ def get_long_running_output(pipeline_response):
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
- begin_remove_language_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeLanguageExtensions'} # type: ignore
+ begin_remove_language_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeLanguageExtensions'} # type: ignore
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_data_connection_operations.py b/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_data_connections_operations.py
similarity index 88%
rename from src/kusto/azext_kusto/vendored_sdks/kusto/operations/_data_connection_operations.py
rename to src/kusto/azext_kusto/vendored_sdks/kusto/operations/_data_connections_operations.py
index 4c2fbb416aa..5aa6d8840d0 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_data_connection_operations.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_data_connections_operations.py
@@ -8,7 +8,7 @@
from typing import TYPE_CHECKING
import warnings
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
@@ -25,8 +25,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
-class DataConnectionOperations(object):
- """DataConnectionOperations operations.
+class DataConnectionsOperations(object):
+ """DataConnectionsOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
@@ -69,14 +69,17 @@ def list_by_database(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DataConnectionListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
@@ -128,18 +131,18 @@ def _data_connection_validation_initial(
resource_group_name, # type: str
cluster_name, # type: str
database_name, # type: str
- data_connection_name=None, # type: Optional[str]
- properties=None, # type: Optional["models.DataConnection"]
+ parameters, # type: "models.DataConnectionValidation"
**kwargs # type: Any
):
# type: (...) -> Optional["models.DataConnectionValidationListResult"]
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.DataConnectionValidationListResult"]]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- parameters = models.DataConnectionValidation(data_connection_name=data_connection_name, properties=properties)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._data_connection_validation_initial.metadata['url'] # type: ignore
@@ -158,13 +161,12 @@ def _data_connection_validation_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'DataConnectionValidation')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -187,8 +189,7 @@ def begin_data_connection_validation(
resource_group_name, # type: str
cluster_name, # type: str
database_name, # type: str
- data_connection_name=None, # type: Optional[str]
- properties=None, # type: Optional["models.DataConnection"]
+ parameters, # type: "models.DataConnectionValidation"
**kwargs # type: Any
):
# type: (...) -> LROPoller["models.DataConnectionValidationListResult"]
@@ -200,10 +201,8 @@ def begin_data_connection_validation(
:type cluster_name: str
:param database_name: The name of the database in the Kusto cluster.
:type database_name: str
- :param data_connection_name: The name of the data connection.
- :type data_connection_name: str
- :param properties: The data connection properties to validate.
- :type properties: ~kusto_management_client.models.DataConnection
+ :param parameters: The data connection parameters supplied to the CreateOrUpdate operation.
+ :type parameters: ~kusto_management_client.models.DataConnectionValidation
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -226,8 +225,7 @@ def begin_data_connection_validation(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
database_name=database_name,
- data_connection_name=data_connection_name,
- properties=properties,
+ parameters=parameters,
cls=lambda x,y,z: x,
**kwargs
)
@@ -242,7 +240,14 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs)
+ 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'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -261,8 +266,7 @@ def check_name_availability(
resource_group_name, # type: str
cluster_name, # type: str
database_name, # type: str
- name, # type: str
- type, # type: Union[str, "models.Type"]
+ data_connection_name, # type: "models.DataConnectionCheckNameRequest"
**kwargs # type: Any
):
# type: (...) -> "models.CheckNameResult"
@@ -274,22 +278,21 @@ def check_name_availability(
:type cluster_name: str
:param database_name: The name of the database in the Kusto cluster.
:type database_name: str
- :param name: Data Connection name.
- :type name: str
- :param type: The type of resource, Microsoft.Kusto/clusters/databases/dataConnections.
- :type type: str or ~kusto_management_client.models.Type
+ :param data_connection_name: The name of the data connection.
+ :type data_connection_name: ~kusto_management_client.models.DataConnectionCheckNameRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:return: CheckNameResult, or the result of cls(response)
:rtype: ~kusto_management_client.models.CheckNameResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- data_connection_name = models.DataConnectionCheckNameRequest(name=name, type=type)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.check_name_availability.metadata['url'] # type: ignore
@@ -308,13 +311,12 @@ def check_name_availability(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(data_connection_name, 'DataConnectionCheckNameRequest')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -355,9 +357,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DataConnection"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -376,7 +381,7 @@ def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
@@ -405,10 +410,13 @@ def _create_or_update_initial(
):
# type: (...) -> "models.DataConnection"
cls = kwargs.pop('cls', None) # type: ClsType["models.DataConnection"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._create_or_update_initial.metadata['url'] # type: ignore
@@ -428,13 +436,12 @@ def _create_or_update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'DataConnection')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -517,7 +524,15 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ 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'),
+ 'dataConnectionName': self._serialize.url("data_connection_name", data_connection_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -542,10 +557,13 @@ def _update_initial(
):
# type: (...) -> "models.DataConnection"
cls = kwargs.pop('cls', None) # type: ClsType["models.DataConnection"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._update_initial.metadata['url'] # type: ignore
@@ -565,13 +583,12 @@ def _update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'DataConnection')
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -654,7 +671,15 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ 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'),
+ 'dataConnectionName': self._serialize.url("data_connection_name", data_connection_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -678,9 +703,12 @@ def _delete_initial(
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
@@ -699,6 +727,7 @@ def _delete_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
@@ -766,7 +795,15 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ 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'),
+ 'dataConnectionName': self._serialize.url("data_connection_name", data_connection_name, 'str'),
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_database_principal_assignment_operations.py b/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_database_principal_assignments_operations.py
similarity index 87%
rename from src/kusto/azext_kusto/vendored_sdks/kusto/operations/_database_principal_assignment_operations.py
rename to src/kusto/azext_kusto/vendored_sdks/kusto/operations/_database_principal_assignments_operations.py
index 86e2aab5646..447ff4794dc 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_database_principal_assignment_operations.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_database_principal_assignments_operations.py
@@ -8,7 +8,7 @@
from typing import TYPE_CHECKING
import warnings
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
@@ -25,8 +25,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
-class DatabasePrincipalAssignmentOperations(object):
- """DatabasePrincipalAssignmentOperations operations.
+class DatabasePrincipalAssignmentsOperations(object):
+ """DatabasePrincipalAssignmentsOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
@@ -52,8 +52,7 @@ def check_name_availability(
resource_group_name, # type: str
cluster_name, # type: str
database_name, # type: str
- name, # type: str
- type, # type: Union[str, "models.Type"]
+ principal_assignment_name, # type: "models.DatabasePrincipalAssignmentCheckNameRequest"
**kwargs # type: Any
):
# type: (...) -> "models.CheckNameResult"
@@ -65,22 +64,21 @@ def check_name_availability(
:type cluster_name: str
:param database_name: The name of the database in the Kusto cluster.
:type database_name: str
- :param name: Principal Assignment resource name.
- :type name: str
- :param type: The type of resource, Microsoft.Kusto/clusters/databases/principalAssignments.
- :type type: str or ~kusto_management_client.models.Type
+ :param principal_assignment_name: The name of the resource.
+ :type principal_assignment_name: ~kusto_management_client.models.DatabasePrincipalAssignmentCheckNameRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:return: CheckNameResult, or the result of cls(response)
:rtype: ~kusto_management_client.models.CheckNameResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- principal_assignment_name = models.DatabasePrincipalAssignmentCheckNameRequest(name=name, type=type)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.check_name_availability.metadata['url'] # type: ignore
@@ -99,13 +97,12 @@ def check_name_availability(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(principal_assignment_name, 'DatabasePrincipalAssignmentCheckNameRequest')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -146,9 +143,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DatabasePrincipalAssignment"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -167,7 +167,7 @@ def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
@@ -191,20 +191,18 @@ def _create_or_update_initial(
cluster_name, # type: str
database_name, # type: str
principal_assignment_name, # type: str
- principal_id=None, # type: Optional[str]
- role=None, # type: Optional[Union[str, "models.DatabasePrincipalRole"]]
- tenant_id=None, # type: Optional[str]
- principal_type=None, # type: Optional[Union[str, "models.PrincipalType"]]
+ parameters, # type: "models.DatabasePrincipalAssignment"
**kwargs # type: Any
):
# type: (...) -> "models.DatabasePrincipalAssignment"
cls = kwargs.pop('cls', None) # type: ClsType["models.DatabasePrincipalAssignment"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- parameters = models.DatabasePrincipalAssignment(principal_id=principal_id, role=role, tenant_id=tenant_id, principal_type=principal_type)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._create_or_update_initial.metadata['url'] # type: ignore
@@ -224,13 +222,12 @@ def _create_or_update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'DatabasePrincipalAssignment')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -256,10 +253,7 @@ def begin_create_or_update(
cluster_name, # type: str
database_name, # type: str
principal_assignment_name, # type: str
- principal_id=None, # type: Optional[str]
- role=None, # type: Optional[Union[str, "models.DatabasePrincipalRole"]]
- tenant_id=None, # type: Optional[str]
- principal_type=None, # type: Optional[Union[str, "models.PrincipalType"]]
+ parameters, # type: "models.DatabasePrincipalAssignment"
**kwargs # type: Any
):
# type: (...) -> LROPoller["models.DatabasePrincipalAssignment"]
@@ -273,15 +267,8 @@ def begin_create_or_update(
:type database_name: str
:param principal_assignment_name: The name of the Kusto principalAssignment.
:type principal_assignment_name: str
- :param principal_id: The principal ID assigned to the database principal. It can be a user
- email, application ID, or security group name.
- :type principal_id: str
- :param role: Database principal role.
- :type role: str or ~kusto_management_client.models.DatabasePrincipalRole
- :param tenant_id: The tenant id of the principal.
- :type tenant_id: str
- :param principal_type: Principal type.
- :type principal_type: str or ~kusto_management_client.models.PrincipalType
+ :param parameters: The Kusto principalAssignments parameters supplied for the operation.
+ :type parameters: ~kusto_management_client.models.DatabasePrincipalAssignment
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
@@ -305,10 +292,7 @@ def begin_create_or_update(
cluster_name=cluster_name,
database_name=database_name,
principal_assignment_name=principal_assignment_name,
- principal_id=principal_id,
- role=role,
- tenant_id=tenant_id,
- principal_type=principal_type,
+ parameters=parameters,
cls=lambda x,y,z: x,
**kwargs
)
@@ -323,7 +307,15 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ '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'),
+ 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -347,9 +339,12 @@ def _delete_initial(
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
@@ -368,6 +363,7 @@ def _delete_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
@@ -435,7 +431,15 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ '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'),
+ 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -471,14 +475,17 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DatabasePrincipalAssignmentListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_database_operations.py b/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_databases_operations.py
similarity index 86%
rename from src/kusto/azext_kusto/vendored_sdks/kusto/operations/_database_operations.py
rename to src/kusto/azext_kusto/vendored_sdks/kusto/operations/_databases_operations.py
index 07f3bfc88fa..b1f1837cf0e 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_database_operations.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_databases_operations.py
@@ -8,7 +8,7 @@
from typing import TYPE_CHECKING
import warnings
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
@@ -20,13 +20,13 @@
if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
- from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union
+ from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
-class DatabaseOperations(object):
- """DatabaseOperations operations.
+class DatabasesOperations(object):
+ """DatabasesOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
@@ -51,8 +51,7 @@ def check_name_availability(
self,
resource_group_name, # type: str
cluster_name, # type: str
- name, # type: str
- type, # type: Union[str, "models.Type"]
+ resource_name, # type: "models.CheckNameRequest"
**kwargs # type: Any
):
# type: (...) -> "models.CheckNameResult"
@@ -62,22 +61,21 @@ def check_name_availability(
:type resource_group_name: str
:param cluster_name: The name of the Kusto cluster.
:type cluster_name: str
- :param name: Resource name.
- :type name: str
- :param type: The type of resource, for instance Microsoft.Kusto/clusters/databases.
- :type type: str or ~kusto_management_client.models.Type
+ :param resource_name: The name of the resource.
+ :type resource_name: ~kusto_management_client.models.CheckNameRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:return: CheckNameResult, or the result of cls(response)
:rtype: ~kusto_management_client.models.CheckNameResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- resource_name = models.CheckNameRequest(name=name, type=type)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self.check_name_availability.metadata['url'] # type: ignore
@@ -95,13 +93,12 @@ def check_name_availability(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(resource_name, 'CheckNameRequest')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -136,14 +133,17 @@ def list_by_cluster(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
@@ -211,9 +211,12 @@ def get(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Database"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
@@ -231,7 +234,7 @@ def get(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
@@ -259,10 +262,13 @@ def _create_or_update_initial(
):
# type: (...) -> "models.Database"
cls = kwargs.pop('cls', None) # type: ClsType["models.Database"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._create_or_update_initial.metadata['url'] # type: ignore
@@ -281,13 +287,12 @@ def _create_or_update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'Database')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -366,7 +371,14 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ 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'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -390,10 +402,13 @@ def _update_initial(
):
# type: (...) -> "models.Database"
cls = kwargs.pop('cls', None) # type: ClsType["models.Database"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
url = self._update_initial.metadata['url'] # type: ignore
@@ -412,13 +427,12 @@ def _update_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'Database')
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -497,7 +511,14 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ 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'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -520,9 +541,12 @@ def _delete_initial(
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
@@ -540,6 +564,7 @@ def _delete_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
@@ -603,7 +628,14 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
- if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ 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'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -617,7 +649,7 @@ def get_long_running_output(pipeline_response):
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}'} # type: ignore
- def list_principal(
+ def list_principals(
self,
resource_group_name, # type: str
cluster_name, # type: str
@@ -639,18 +671,21 @@ def list_principal(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DatabasePrincipalListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
- url = self.list_principal.metadata['url'] # type: ignore
+ url = self.list_principals.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
@@ -691,14 +726,14 @@ def get_next(next_link=None):
return ItemPaged(
get_next, extract_data
)
- list_principal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/listPrincipals'} # type: ignore
+ list_principals.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/listPrincipals'} # type: ignore
- def add_principal(
+ def add_principals(
self,
resource_group_name, # type: str
cluster_name, # type: str
database_name, # type: str
- value=None, # type: Optional[List["models.DatabasePrincipal"]]
+ database_principals_to_add, # type: "models.DatabasePrincipalListRequest"
**kwargs # type: Any
):
# type: (...) -> "models.DatabasePrincipalListResult"
@@ -710,23 +745,24 @@ def add_principal(
: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[~kusto_management_client.models.DatabasePrincipal]
+ :param database_principals_to_add: List of database principals to add.
+ :type database_principals_to_add: ~kusto_management_client.models.DatabasePrincipalListRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:return: DatabasePrincipalListResult, or the result of cls(response)
:rtype: ~kusto_management_client.models.DatabasePrincipalListResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DatabasePrincipalListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- database_principals_to_add = models.DatabasePrincipalListRequest(value=value)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
- url = self.add_principal.metadata['url'] # type: ignore
+ url = self.add_principals.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
@@ -742,13 +778,12 @@ def add_principal(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(database_principals_to_add, 'DatabasePrincipalListRequest')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -762,14 +797,14 @@ def add_principal(
return cls(pipeline_response, deserialized, {})
return deserialized
- add_principal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/addPrincipals'} # type: ignore
+ add_principals.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/addPrincipals'} # type: ignore
- def remove_principal(
+ def remove_principals(
self,
resource_group_name, # type: str
cluster_name, # type: str
database_name, # type: str
- value=None, # type: Optional[List["models.DatabasePrincipal"]]
+ database_principals_to_remove, # type: "models.DatabasePrincipalListRequest"
**kwargs # type: Any
):
# type: (...) -> "models.DatabasePrincipalListResult"
@@ -781,23 +816,24 @@ def remove_principal(
: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[~kusto_management_client.models.DatabasePrincipal]
+ :param database_principals_to_remove: List of database principals to remove.
+ :type database_principals_to_remove: ~kusto_management_client.models.DatabasePrincipalListRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:return: DatabasePrincipalListResult, or the result of cls(response)
:rtype: ~kusto_management_client.models.DatabasePrincipalListResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DatabasePrincipalListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
-
- database_principals_to_remove = models.DatabasePrincipalListRequest(value=value)
api_version = "2020-09-18"
content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
# Construct URL
- url = self.remove_principal.metadata['url'] # type: ignore
+ url = self.remove_principals.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
@@ -813,13 +849,12 @@ def remove_principal(
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(database_principals_to_remove, 'DatabasePrincipalListRequest')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
-
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -833,4 +868,4 @@ def remove_principal(
return cls(pipeline_response, deserialized, {})
return deserialized
- remove_principal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/removePrincipals'} # type: ignore
+ remove_principals.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/removePrincipals'} # type: ignore
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_operation_operations.py b/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_operations.py
similarity index 90%
rename from src/kusto/azext_kusto/vendored_sdks/kusto/operations/_operation_operations.py
rename to src/kusto/azext_kusto/vendored_sdks/kusto/operations/_operations.py
index 1f2df08ad51..5270b97a237 100644
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_operation_operations.py
+++ b/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_operations.py
@@ -8,7 +8,7 @@
from typing import TYPE_CHECKING
import warnings
-from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
@@ -23,8 +23,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
-class OperationOperations(object):
- """OperationOperations operations.
+class Operations(object):
+ """Operations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
@@ -58,14 +58,17 @@ def list(
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"]
- error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
+ accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = 'application/json'
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
diff --git a/src/kusto/azext_kusto/vendored_sdks/kusto/setup.py b/src/kusto/azext_kusto/vendored_sdks/kusto/setup.py
deleted file mode 100644
index 6f2ab0c5bff..00000000000
--- a/src/kusto/azext_kusto/vendored_sdks/kusto/setup.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# coding=utf-8
-# --------------------------------------------------------------------------
-# Copyright (c) Microsoft Corporation. All rights reserved.
-# Licensed under the MIT License. See License.txt in the project root for license information.
-# Code generated by Microsoft (R) AutoRest Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-# coding: utf-8
-
-from setuptools import setup, find_packages
-
-NAME = "kustomanagementclient"
-VERSION = "0.1.0"
-
-# To install the library, run the following
-#
-# python setup.py install
-#
-# prerequisite: setuptools
-# http://pypi.python.org/pypi/setuptools
-
-REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"]
-
-setup(
- name=NAME,
- version=VERSION,
- description="KustoManagementClient",
- author_email="",
- url="",
- keywords=["Swagger", "KustoManagementClient"],
- install_requires=REQUIRES,
- packages=find_packages(),
- include_package_data=True,
- long_description="""\
- The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases.
- """
-)
diff --git a/src/kusto/gen.zip b/src/kusto/gen.zip
deleted file mode 100644
index 478d1542293..00000000000
Binary files a/src/kusto/gen.zip and /dev/null differ
diff --git a/src/kusto/report.md b/src/kusto/report.md
index fb495c8d4ef..a52fc614cfd 100644
--- a/src/kusto/report.md
+++ b/src/kusto/report.md
@@ -206,7 +206,7 @@ az kusto cluster show --name "kustoclusterrptest4" --resource-group "kustorptest
##### Example
```
-az kusto cluster create --name "kustoclusterrptest4" --identity-type "SystemAssigned" --location "westus" \
+az kusto cluster create --name "kustoclusterrptest4" --type "SystemAssigned" --location "westus" \
--enable-double-encryption false --enable-purge true --enable-streaming-ingest true --sku name="Standard_L8s" \
capacity=2 tier="Standard" --resource-group "kustorptest"
```
@@ -228,15 +228,15 @@ capacity=2 tier="Standard" --resource-group "kustorptest"
|**--enable-purge**|boolean|A boolean value that indicates if the purge operations are enabled.|enable_purge|enablePurge|
|**--enable-double-encryption**|boolean|A boolean value that indicates if double encryption is enabled.|enable_double_encryption|enableDoubleEncryption|
|**--engine-type**|choice|The engine type|engine_type|engineType|
-|**--identity-type**|choice|The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove all identities.|type|type|
-|**--identity-user-assigned-identities**|dictionary|The list of user identities associated with the Kusto cluster. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.|user_assigned_identities|userAssignedIdentities|
+|**--type**|choice|The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove all identities.|type|type|
+|**--user-assigned-identities**|dictionary|The list of user identities associated with the Kusto cluster. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.|user_assigned_identities|userAssignedIdentities|
#### Command `az kusto cluster update`
##### Example
```
-az kusto cluster update --name "kustoclusterrptest4" --identity-type "SystemAssigned" --location "westus" \
---enable-purge true --enable-streaming-ingest true --engine-type "V2" --key-vault-properties key-name="keyName" \
+az kusto cluster update --name "kustoclusterrptest4" --type "SystemAssigned" --location "westus" --enable-purge true \
+--enable-streaming-ingest true --engine-type "V2" --key-vault-properties key-name="keyName" \
key-vault-uri="https://dummy.keyvault.com" key-version="keyVersion" --resource-group "kustorptest"
```
##### Parameters
@@ -256,8 +256,8 @@ key-vault-uri="https://dummy.keyvault.com" key-version="keyVersion" --resource-g
|**--enable-purge**|boolean|A boolean value that indicates if the purge operations are enabled.|enable_purge|enablePurge|
|**--enable-double-encryption**|boolean|A boolean value that indicates if double encryption is enabled.|enable_double_encryption|enableDoubleEncryption|
|**--engine-type**|choice|The engine type|engine_type|engineType|
-|**--identity-type**|choice|The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove all identities.|type|type|
-|**--identity-user-assigned-identities**|dictionary|The list of user identities associated with the Kusto cluster. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.|user_assigned_identities|userAssignedIdentities|
+|**--type**|choice|The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove all identities.|type|type|
+|**--user-assigned-identities**|dictionary|The list of user identities associated with the Kusto cluster. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.|user_assigned_identities|userAssignedIdentities|
#### Command `az kusto cluster delete`
diff --git a/src/kusto/setup.py b/src/kusto/setup.py
index 5876db3f38b..9f4a85de1fb 100644
--- a/src/kusto/setup.py
+++ b/src/kusto/setup.py
@@ -10,7 +10,7 @@
from setuptools import setup, find_packages
# HISTORY.rst entry.
-VERSION = '0.2.0'
+VERSION = '0.1.0'
try:
from azext_kusto.manual.version import VERSION
except ImportError: