diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/kusto_management_client.py b/azure-mgmt-kusto/azure/mgmt/kusto/kusto_management_client.py index 1002ed1481dc..808cc772ea32 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/kusto_management_client.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/kusto_management_client.py @@ -15,6 +15,7 @@ from .version import VERSION from .operations.clusters_operations import ClustersOperations from .operations.databases_operations import DatabasesOperations +from .operations.attached_database_configurations_operations import AttachedDatabaseConfigurationsOperations from .operations.data_connections_operations import DataConnectionsOperations from .operations.operations import Operations from . import models @@ -64,6 +65,8 @@ class KustoManagementClient(SDKClient): :vartype clusters: azure.mgmt.kusto.operations.ClustersOperations :ivar databases: Databases operations :vartype databases: azure.mgmt.kusto.operations.DatabasesOperations + :ivar attached_database_configurations: AttachedDatabaseConfigurations operations + :vartype attached_database_configurations: azure.mgmt.kusto.operations.AttachedDatabaseConfigurationsOperations :ivar data_connections: DataConnections operations :vartype data_connections: azure.mgmt.kusto.operations.DataConnectionsOperations :ivar operations: Operations operations @@ -94,6 +97,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.databases = DatabasesOperations( self._client, self.config, self._serialize, self._deserialize) + self.attached_database_configurations = AttachedDatabaseConfigurationsOperations( + self._client, self.config, self._serialize, self._deserialize) self.data_connections = DataConnectionsOperations( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py index 950d7582ad2e..04a479f2d32e 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py @@ -11,25 +11,32 @@ try: from .trusted_external_tenant_py3 import TrustedExternalTenant + from .intelligent_autoscale_py3 import IntelligentAutoscale from .azure_sku_py3 import AzureSku from .azure_capacity_py3 import AzureCapacity from .azure_resource_sku_py3 import AzureResourceSku + from .sku_location_info_item_py3 import SkuLocationInfoItem + from .sku_description_py3 import SkuDescription from .database_statistics_py3 import DatabaseStatistics from .cluster_py3 import Cluster from .cluster_update_py3 import ClusterUpdate + from .attached_database_configuration_py3 import AttachedDatabaseConfiguration from .database_py3 import Database - from .database_update_py3 import DatabaseUpdate + from .read_write_database_py3 import ReadWriteDatabase + from .read_only_attached_database_py3 import ReadOnlyAttachedDatabase from .database_principal_py3 import DatabasePrincipal from .database_principal_list_result_py3 import DatabasePrincipalListResult + from .follower_database_result_py3 import FollowerDatabaseResult from .data_connection_py3 import DataConnection from .data_connection_validation_result_py3 import DataConnectionValidationResult from .database_principal_list_request_py3 import DatabasePrincipalListRequest + from .follower_database_request_py3 import FollowerDatabaseRequest from .data_connection_validation_py3 import DataConnectionValidation from .event_hub_data_connection_py3 import EventHubDataConnection from .event_grid_data_connection_py3 import EventGridDataConnection from .data_connection_validation_list_result_py3 import DataConnectionValidationListResult from .cluster_check_name_request_py3 import ClusterCheckNameRequest - from .database_check_name_request_py3 import DatabaseCheckNameRequest + from .check_name_request_py3 import CheckNameRequest from .data_connection_check_name_request_py3 import DataConnectionCheckNameRequest from .check_name_result_py3 import CheckNameResult from .operation_display_py3 import OperationDisplay @@ -40,25 +47,32 @@ from .proxy_resource_py3 import ProxyResource except (SyntaxError, ImportError): from .trusted_external_tenant import TrustedExternalTenant + from .intelligent_autoscale import IntelligentAutoscale from .azure_sku import AzureSku from .azure_capacity import AzureCapacity from .azure_resource_sku import AzureResourceSku + from .sku_location_info_item import SkuLocationInfoItem + from .sku_description import SkuDescription from .database_statistics import DatabaseStatistics from .cluster import Cluster from .cluster_update import ClusterUpdate + from .attached_database_configuration import AttachedDatabaseConfiguration from .database import Database - from .database_update import DatabaseUpdate + from .read_write_database import ReadWriteDatabase + from .read_only_attached_database import ReadOnlyAttachedDatabase from .database_principal import DatabasePrincipal from .database_principal_list_result import DatabasePrincipalListResult + from .follower_database_result import FollowerDatabaseResult from .data_connection import DataConnection from .data_connection_validation_result import DataConnectionValidationResult from .database_principal_list_request import DatabasePrincipalListRequest + from .follower_database_request import FollowerDatabaseRequest from .data_connection_validation import DataConnectionValidation from .event_hub_data_connection import EventHubDataConnection from .event_grid_data_connection import EventGridDataConnection from .data_connection_validation_list_result import DataConnectionValidationListResult from .cluster_check_name_request import ClusterCheckNameRequest - from .database_check_name_request import DatabaseCheckNameRequest + from .check_name_request import CheckNameRequest from .data_connection_check_name_request import DataConnectionCheckNameRequest from .check_name_result import CheckNameResult from .operation_display import OperationDisplay @@ -67,45 +81,56 @@ from .azure_entity_resource import AzureEntityResource from .resource import Resource from .proxy_resource import ProxyResource +from .follower_database_result_paged import FollowerDatabaseResultPaged from .cluster_paged import ClusterPaged -from .azure_sku_paged import AzureSkuPaged +from .sku_description_paged import SkuDescriptionPaged from .azure_resource_sku_paged import AzureResourceSkuPaged from .database_paged import DatabasePaged from .database_principal_paged import DatabasePrincipalPaged +from .attached_database_configuration_paged import AttachedDatabaseConfigurationPaged from .data_connection_paged import DataConnectionPaged from .operation_paged import OperationPaged from .kusto_management_client_enums import ( State, ProvisioningState, AzureSkuName, + AzureSkuTier, AzureScaleType, DataFormat, DatabasePrincipalRole, DatabasePrincipalType, + Type, Reason, ) __all__ = [ 'TrustedExternalTenant', + 'IntelligentAutoscale', 'AzureSku', 'AzureCapacity', 'AzureResourceSku', + 'SkuLocationInfoItem', + 'SkuDescription', 'DatabaseStatistics', 'Cluster', 'ClusterUpdate', + 'AttachedDatabaseConfiguration', 'Database', - 'DatabaseUpdate', + 'ReadWriteDatabase', + 'ReadOnlyAttachedDatabase', 'DatabasePrincipal', 'DatabasePrincipalListResult', + 'FollowerDatabaseResult', 'DataConnection', 'DataConnectionValidationResult', 'DatabasePrincipalListRequest', + 'FollowerDatabaseRequest', 'DataConnectionValidation', 'EventHubDataConnection', 'EventGridDataConnection', 'DataConnectionValidationListResult', 'ClusterCheckNameRequest', - 'DatabaseCheckNameRequest', + 'CheckNameRequest', 'DataConnectionCheckNameRequest', 'CheckNameResult', 'OperationDisplay', @@ -114,19 +139,23 @@ 'AzureEntityResource', 'Resource', 'ProxyResource', + 'FollowerDatabaseResultPaged', 'ClusterPaged', - 'AzureSkuPaged', + 'SkuDescriptionPaged', 'AzureResourceSkuPaged', 'DatabasePaged', 'DatabasePrincipalPaged', + 'AttachedDatabaseConfigurationPaged', 'DataConnectionPaged', 'OperationPaged', 'State', 'ProvisioningState', 'AzureSkuName', + 'AzureSkuTier', 'AzureScaleType', 'DataFormat', 'DatabasePrincipalRole', 'DatabasePrincipalType', + 'Type', 'Reason', ] diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/attached_database_configuration.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/attached_database_configuration.py new file mode 100644 index 000000000000..10503cddc234 --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/attached_database_configuration.py @@ -0,0 +1,69 @@ +# 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 .proxy_resource import ProxyResource + + +class AttachedDatabaseConfiguration(ProxyResource): + """Class representing an attached database configuration. + + 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 - + /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. + :vartype type: str + :param location: Resource location. + :type location: str + :param database_name: Required. 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: Required. The resource id of the cluster where + the databases you would like to attach reside. + :type cluster_resource_id: str + :ivar attached_database_names: The list of databases from the + clusterResourceId which are currently attached to the cluster. + :vartype attached_database_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'required': True}, + 'cluster_resource_id': {'required': True}, + 'attached_database_names': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'cluster_resource_id': {'key': 'properties.clusterResourceId', 'type': 'str'}, + 'attached_database_names': {'key': 'properties.attachedDatabaseNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(AttachedDatabaseConfiguration, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.database_name = kwargs.get('database_name', None) + self.cluster_resource_id = kwargs.get('cluster_resource_id', None) + self.attached_database_names = None diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/attached_database_configuration_paged.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/attached_database_configuration_paged.py new file mode 100644 index 000000000000..48f4e7ac02ab --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/attached_database_configuration_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class AttachedDatabaseConfigurationPaged(Paged): + """ + A paging container for iterating over a list of :class:`AttachedDatabaseConfiguration ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AttachedDatabaseConfiguration]'} + } + + def __init__(self, *args, **kwargs): + + super(AttachedDatabaseConfigurationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/attached_database_configuration_py3.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/attached_database_configuration_py3.py new file mode 100644 index 000000000000..d8e44fd4124e --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/attached_database_configuration_py3.py @@ -0,0 +1,69 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class AttachedDatabaseConfiguration(ProxyResource): + """Class representing an attached database configuration. + + 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 - + /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. + :vartype type: str + :param location: Resource location. + :type location: str + :param database_name: Required. 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: Required. The resource id of the cluster where + the databases you would like to attach reside. + :type cluster_resource_id: str + :ivar attached_database_names: The list of databases from the + clusterResourceId which are currently attached to the cluster. + :vartype attached_database_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'required': True}, + 'cluster_resource_id': {'required': True}, + 'attached_database_names': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'cluster_resource_id': {'key': 'properties.clusterResourceId', 'type': 'str'}, + 'attached_database_names': {'key': 'properties.attachedDatabaseNames', 'type': '[str]'}, + } + + def __init__(self, *, database_name: str, cluster_resource_id: str, location: str=None, **kwargs) -> None: + super(AttachedDatabaseConfiguration, self).__init__(**kwargs) + self.location = location + self.database_name = database_name + self.cluster_resource_id = cluster_resource_id + self.attached_database_names = None diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/azure_sku.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/azure_sku.py index 49faa9f82911..1c9c23a0e149 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/models/azure_sku.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/azure_sku.py @@ -15,23 +15,24 @@ class AzureSku(Model): """Azure SKU definition. - 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. SKU name. Possible values include: 'D13_v2', - 'D14_v2', 'L8', 'L16', 'D11_v2', 'D12_v2', 'L4' + :param name: Required. SKU name. Possible values include: + 'Standard_DS13_v2+1TB_PS', 'Standard_DS13_v2+2TB_PS', + 'Standard_DS14_v2+3TB_PS', 'Standard_DS14_v2+4TB_PS', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_L8s', 'Standard_L16s', 'Standard_D11_v2', + 'Standard_D12_v2', 'Standard_L4s', 'Dev(No SLA)_Standard_D11_v2' :type name: str or ~azure.mgmt.kusto.models.AzureSkuName :param capacity: SKU capacity. :type capacity: int - :ivar tier: Required. SKU tier. Default value: "Standard" . - :vartype tier: str + :param tier: Required. SKU tier. Possible values include: 'Basic', + 'Standard' + :type tier: str or ~azure.mgmt.kusto.models.AzureSkuTier """ _validation = { 'name': {'required': True}, - 'tier': {'required': True, 'constant': True}, + 'tier': {'required': True}, } _attribute_map = { @@ -40,9 +41,8 @@ class AzureSku(Model): 'tier': {'key': 'tier', 'type': 'str'}, } - tier = "Standard" - def __init__(self, **kwargs): super(AzureSku, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.capacity = kwargs.get('capacity', None) + self.tier = kwargs.get('tier', None) diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/azure_sku_py3.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/azure_sku_py3.py index a5fe5ac0bdd0..2122a176ce2a 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/models/azure_sku_py3.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/azure_sku_py3.py @@ -15,23 +15,24 @@ class AzureSku(Model): """Azure SKU definition. - 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. SKU name. Possible values include: 'D13_v2', - 'D14_v2', 'L8', 'L16', 'D11_v2', 'D12_v2', 'L4' + :param name: Required. SKU name. Possible values include: + 'Standard_DS13_v2+1TB_PS', 'Standard_DS13_v2+2TB_PS', + 'Standard_DS14_v2+3TB_PS', 'Standard_DS14_v2+4TB_PS', 'Standard_D13_v2', + 'Standard_D14_v2', 'Standard_L8s', 'Standard_L16s', 'Standard_D11_v2', + 'Standard_D12_v2', 'Standard_L4s', 'Dev(No SLA)_Standard_D11_v2' :type name: str or ~azure.mgmt.kusto.models.AzureSkuName :param capacity: SKU capacity. :type capacity: int - :ivar tier: Required. SKU tier. Default value: "Standard" . - :vartype tier: str + :param tier: Required. SKU tier. Possible values include: 'Basic', + 'Standard' + :type tier: str or ~azure.mgmt.kusto.models.AzureSkuTier """ _validation = { 'name': {'required': True}, - 'tier': {'required': True, 'constant': True}, + 'tier': {'required': True}, } _attribute_map = { @@ -40,9 +41,8 @@ class AzureSku(Model): 'tier': {'key': 'tier', 'type': 'str'}, } - tier = "Standard" - - def __init__(self, *, name, capacity: int=None, **kwargs) -> None: + def __init__(self, *, name, tier, capacity: int=None, **kwargs) -> None: super(AzureSku, self).__init__(**kwargs) self.name = name self.capacity = capacity + self.tier = tier diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/database_check_name_request.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/check_name_request.py similarity index 61% rename from azure-mgmt-kusto/azure/mgmt/kusto/models/database_check_name_request.py rename to azure-mgmt-kusto/azure/mgmt/kusto/models/check_name_request.py index 07e77d8bab96..42a65c4a3b39 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/models/database_check_name_request.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/check_name_request.py @@ -12,34 +12,31 @@ from msrest.serialization import Model -class DatabaseCheckNameRequest(Model): +class CheckNameRequest(Model): """The result returned from a database 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. Database name. + :param name: Required. Resource name. :type name: str - :ivar type: Required. The type of resource, - Microsoft.Kusto/clusters/databases. Default value: - "Microsoft.Kusto/clusters/databases" . - :vartype type: str + :param type: Required. The type of resource, for instance + Microsoft.Kusto/clusters/databases. Possible values include: + 'Microsoft.Kusto/clusters/databases', + 'Microsoft.Kusto/clusters/attachedDatabaseConfigurations' + :type type: str or ~azure.mgmt.kusto.models.Type """ _validation = { 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, + 'type': {'required': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'Type'}, } - type = "Microsoft.Kusto/clusters/databases" - def __init__(self, **kwargs): - super(DatabaseCheckNameRequest, self).__init__(**kwargs) + super(CheckNameRequest, self).__init__(**kwargs) self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/database_check_name_request_py3.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/check_name_request_py3.py similarity index 58% rename from azure-mgmt-kusto/azure/mgmt/kusto/models/database_check_name_request_py3.py rename to azure-mgmt-kusto/azure/mgmt/kusto/models/check_name_request_py3.py index 57cc9c58ada8..1df6abba7e98 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/models/database_check_name_request_py3.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/check_name_request_py3.py @@ -12,34 +12,31 @@ from msrest.serialization import Model -class DatabaseCheckNameRequest(Model): +class CheckNameRequest(Model): """The result returned from a database 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. Database name. + :param name: Required. Resource name. :type name: str - :ivar type: Required. The type of resource, - Microsoft.Kusto/clusters/databases. Default value: - "Microsoft.Kusto/clusters/databases" . - :vartype type: str + :param type: Required. The type of resource, for instance + Microsoft.Kusto/clusters/databases. Possible values include: + 'Microsoft.Kusto/clusters/databases', + 'Microsoft.Kusto/clusters/attachedDatabaseConfigurations' + :type type: str or ~azure.mgmt.kusto.models.Type """ _validation = { 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, + 'type': {'required': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'Type'}, } - type = "Microsoft.Kusto/clusters/databases" - - def __init__(self, *, name: str, **kwargs) -> None: - super(DatabaseCheckNameRequest, self).__init__(**kwargs) + def __init__(self, *, name: str, type, **kwargs) -> None: + super(CheckNameRequest, self).__init__(**kwargs) self.name = name + self.type = type diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/cluster.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/cluster.py index 0a18502acad6..5c96b59a2d64 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/models/cluster.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/cluster.py @@ -39,7 +39,8 @@ class Cluster(TrackedResource): 'Stopped', 'Starting', 'Updating' :vartype state: str or ~azure.mgmt.kusto.models.State :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed' + values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Moving' :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState :ivar uri: The cluster URI. @@ -49,6 +50,8 @@ class Cluster(TrackedResource): :param trusted_external_tenants: The cluster's external tenants. :type trusted_external_tenants: list[~azure.mgmt.kusto.models.TrustedExternalTenant] + :param intelligent_autoscale: Intelligent auto scale definition. + :type intelligent_autoscale: ~azure.mgmt.kusto.models.IntelligentAutoscale """ _validation = { @@ -75,6 +78,7 @@ class Cluster(TrackedResource): 'uri': {'key': 'properties.uri', 'type': 'str'}, 'data_ingestion_uri': {'key': 'properties.dataIngestionUri', 'type': 'str'}, 'trusted_external_tenants': {'key': 'properties.trustedExternalTenants', 'type': '[TrustedExternalTenant]'}, + 'intelligent_autoscale': {'key': 'properties.intelligentAutoscale', 'type': 'IntelligentAutoscale'}, } def __init__(self, **kwargs): @@ -85,3 +89,4 @@ def __init__(self, **kwargs): self.uri = None self.data_ingestion_uri = None self.trusted_external_tenants = kwargs.get('trusted_external_tenants', None) + self.intelligent_autoscale = kwargs.get('intelligent_autoscale', None) diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/cluster_py3.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/cluster_py3.py index 317d5c5f5205..524b3fdd733a 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/models/cluster_py3.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/cluster_py3.py @@ -39,7 +39,8 @@ class Cluster(TrackedResource): 'Stopped', 'Starting', 'Updating' :vartype state: str or ~azure.mgmt.kusto.models.State :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed' + values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Moving' :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState :ivar uri: The cluster URI. @@ -49,6 +50,8 @@ class Cluster(TrackedResource): :param trusted_external_tenants: The cluster's external tenants. :type trusted_external_tenants: list[~azure.mgmt.kusto.models.TrustedExternalTenant] + :param intelligent_autoscale: Intelligent auto scale definition. + :type intelligent_autoscale: ~azure.mgmt.kusto.models.IntelligentAutoscale """ _validation = { @@ -75,9 +78,10 @@ class Cluster(TrackedResource): 'uri': {'key': 'properties.uri', 'type': 'str'}, 'data_ingestion_uri': {'key': 'properties.dataIngestionUri', 'type': 'str'}, 'trusted_external_tenants': {'key': 'properties.trustedExternalTenants', 'type': '[TrustedExternalTenant]'}, + 'intelligent_autoscale': {'key': 'properties.intelligentAutoscale', 'type': 'IntelligentAutoscale'}, } - def __init__(self, *, location: str, sku, tags=None, trusted_external_tenants=None, **kwargs) -> None: + def __init__(self, *, location: str, sku, tags=None, trusted_external_tenants=None, intelligent_autoscale=None, **kwargs) -> None: super(Cluster, self).__init__(tags=tags, location=location, **kwargs) self.sku = sku self.state = None @@ -85,3 +89,4 @@ def __init__(self, *, location: str, sku, tags=None, trusted_external_tenants=No self.uri = None self.data_ingestion_uri = None self.trusted_external_tenants = trusted_external_tenants + self.intelligent_autoscale = intelligent_autoscale diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/cluster_update.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/cluster_update.py index bd5296d80137..dc26f61d550d 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/models/cluster_update.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/cluster_update.py @@ -37,7 +37,8 @@ class ClusterUpdate(Resource): 'Stopped', 'Starting', 'Updating' :vartype state: str or ~azure.mgmt.kusto.models.State :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed' + values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Moving' :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState :ivar uri: The cluster URI. @@ -47,6 +48,8 @@ class ClusterUpdate(Resource): :param trusted_external_tenants: The cluster's external tenants. :type trusted_external_tenants: list[~azure.mgmt.kusto.models.TrustedExternalTenant] + :param intelligent_autoscale: Intelligent auto scale definition. + :type intelligent_autoscale: ~azure.mgmt.kusto.models.IntelligentAutoscale """ _validation = { @@ -71,6 +74,7 @@ class ClusterUpdate(Resource): 'uri': {'key': 'properties.uri', 'type': 'str'}, 'data_ingestion_uri': {'key': 'properties.dataIngestionUri', 'type': 'str'}, 'trusted_external_tenants': {'key': 'properties.trustedExternalTenants', 'type': '[TrustedExternalTenant]'}, + 'intelligent_autoscale': {'key': 'properties.intelligentAutoscale', 'type': 'IntelligentAutoscale'}, } def __init__(self, **kwargs): @@ -83,3 +87,4 @@ def __init__(self, **kwargs): self.uri = None self.data_ingestion_uri = None self.trusted_external_tenants = kwargs.get('trusted_external_tenants', None) + self.intelligent_autoscale = kwargs.get('intelligent_autoscale', None) diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/cluster_update_py3.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/cluster_update_py3.py index ffc45cdb3fe0..cc1795c5e229 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/models/cluster_update_py3.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/cluster_update_py3.py @@ -37,7 +37,8 @@ class ClusterUpdate(Resource): 'Stopped', 'Starting', 'Updating' :vartype state: str or ~azure.mgmt.kusto.models.State :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed' + values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Moving' :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState :ivar uri: The cluster URI. @@ -47,6 +48,8 @@ class ClusterUpdate(Resource): :param trusted_external_tenants: The cluster's external tenants. :type trusted_external_tenants: list[~azure.mgmt.kusto.models.TrustedExternalTenant] + :param intelligent_autoscale: Intelligent auto scale definition. + :type intelligent_autoscale: ~azure.mgmt.kusto.models.IntelligentAutoscale """ _validation = { @@ -71,9 +74,10 @@ class ClusterUpdate(Resource): 'uri': {'key': 'properties.uri', 'type': 'str'}, 'data_ingestion_uri': {'key': 'properties.dataIngestionUri', 'type': 'str'}, 'trusted_external_tenants': {'key': 'properties.trustedExternalTenants', 'type': '[TrustedExternalTenant]'}, + 'intelligent_autoscale': {'key': 'properties.intelligentAutoscale', 'type': 'IntelligentAutoscale'}, } - def __init__(self, *, tags=None, location: str=None, sku=None, trusted_external_tenants=None, **kwargs) -> None: + def __init__(self, *, tags=None, location: str=None, sku=None, trusted_external_tenants=None, intelligent_autoscale=None, **kwargs) -> None: super(ClusterUpdate, self).__init__(**kwargs) self.tags = tags self.location = location @@ -83,3 +87,4 @@ def __init__(self, *, tags=None, location: str=None, sku=None, trusted_external_ self.uri = None self.data_ingestion_uri = None self.trusted_external_tenants = trusted_external_tenants + self.intelligent_autoscale = intelligent_autoscale diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/database.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/database.py index 3b441b079983..13b5e3cf299d 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/models/database.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/database.py @@ -15,9 +15,14 @@ class Database(ProxyResource): """Class representing a Kusto database. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ReadWriteDatabase, ReadOnlyAttachedDatabase + 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 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str @@ -28,25 +33,15 @@ class Database(ProxyResource): :vartype type: str :param location: Resource location. :type location: str - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.kusto.models.ProvisioningState - :param soft_delete_period: The time the data should be kept before it - stops being accessible to queries in TimeSpan. - :type soft_delete_period: timedelta - :param hot_cache_period: The time the data that should be kept in cache - for fast queries in TimeSpan. - :type hot_cache_period: timedelta - :param statistics: The statistics of the database. - :type statistics: ~azure.mgmt.kusto.models.DatabaseStatistics + :param kind: Required. Constant filled by server. + :type kind: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, + 'kind': {'required': True}, } _attribute_map = { @@ -54,16 +49,15 @@ class Database(ProxyResource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'soft_delete_period': {'key': 'properties.softDeletePeriod', 'type': 'duration'}, - 'hot_cache_period': {'key': 'properties.hotCachePeriod', 'type': 'duration'}, - 'statistics': {'key': 'properties.statistics', 'type': 'DatabaseStatistics'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ReadWrite': 'ReadWriteDatabase', 'ReadOnlyAttached': 'ReadOnlyAttachedDatabase'} } def __init__(self, **kwargs): super(Database, self).__init__(**kwargs) self.location = kwargs.get('location', None) - self.provisioning_state = None - self.soft_delete_period = kwargs.get('soft_delete_period', None) - self.hot_cache_period = kwargs.get('hot_cache_period', None) - self.statistics = kwargs.get('statistics', None) + self.kind = None + self.kind = 'Database' diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/database_py3.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/database_py3.py index 6d5ae504ce1b..18d63e1db0fe 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/models/database_py3.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/database_py3.py @@ -15,9 +15,14 @@ class Database(ProxyResource): """Class representing a Kusto database. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ReadWriteDatabase, ReadOnlyAttachedDatabase + 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 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str @@ -28,25 +33,15 @@ class Database(ProxyResource): :vartype type: str :param location: Resource location. :type location: str - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.kusto.models.ProvisioningState - :param soft_delete_period: The time the data should be kept before it - stops being accessible to queries in TimeSpan. - :type soft_delete_period: timedelta - :param hot_cache_period: The time the data that should be kept in cache - for fast queries in TimeSpan. - :type hot_cache_period: timedelta - :param statistics: The statistics of the database. - :type statistics: ~azure.mgmt.kusto.models.DatabaseStatistics + :param kind: Required. Constant filled by server. + :type kind: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, + 'kind': {'required': True}, } _attribute_map = { @@ -54,16 +49,15 @@ class Database(ProxyResource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'soft_delete_period': {'key': 'properties.softDeletePeriod', 'type': 'duration'}, - 'hot_cache_period': {'key': 'properties.hotCachePeriod', 'type': 'duration'}, - 'statistics': {'key': 'properties.statistics', 'type': 'DatabaseStatistics'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ReadWrite': 'ReadWriteDatabase', 'ReadOnlyAttached': 'ReadOnlyAttachedDatabase'} } - def __init__(self, *, location: str=None, soft_delete_period=None, hot_cache_period=None, statistics=None, **kwargs) -> None: + def __init__(self, *, location: str=None, **kwargs) -> None: super(Database, self).__init__(**kwargs) self.location = location - self.provisioning_state = None - self.soft_delete_period = soft_delete_period - self.hot_cache_period = hot_cache_period - self.statistics = statistics + self.kind = None + self.kind = 'Database' diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/follower_database_request.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/follower_database_request.py new file mode 100644 index 000000000000..ec50a9b47ee5 --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/follower_database_request.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class FollowerDatabaseRequest(Model): + """A class representing follower database request. + + All required parameters must be populated in order to send to Azure. + + :param cluster_resource_id: Required. Resource id of the cluster that + follows a database owned by this cluster. + :type cluster_resource_id: str + :param database_name: Required. The database name owned by this cluster + that was followed. * in case following all databases. + :type database_name: str + """ + + _validation = { + 'cluster_resource_id': {'required': True}, + 'database_name': {'required': True}, + } + + _attribute_map = { + 'cluster_resource_id': {'key': 'clusterResourceId', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FollowerDatabaseRequest, self).__init__(**kwargs) + self.cluster_resource_id = kwargs.get('cluster_resource_id', None) + self.database_name = kwargs.get('database_name', None) diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/follower_database_request_py3.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/follower_database_request_py3.py new file mode 100644 index 000000000000..e799edd4e935 --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/follower_database_request_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class FollowerDatabaseRequest(Model): + """A class representing follower database request. + + All required parameters must be populated in order to send to Azure. + + :param cluster_resource_id: Required. Resource id of the cluster that + follows a database owned by this cluster. + :type cluster_resource_id: str + :param database_name: Required. The database name owned by this cluster + that was followed. * in case following all databases. + :type database_name: str + """ + + _validation = { + 'cluster_resource_id': {'required': True}, + 'database_name': {'required': True}, + } + + _attribute_map = { + 'cluster_resource_id': {'key': 'clusterResourceId', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, *, cluster_resource_id: str, database_name: str, **kwargs) -> None: + super(FollowerDatabaseRequest, self).__init__(**kwargs) + self.cluster_resource_id = cluster_resource_id + self.database_name = database_name diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/follower_database_result.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/follower_database_result.py new file mode 100644 index 000000000000..d3f090d354cc --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/follower_database_result.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class FollowerDatabaseResult(Model): + """A class representing database principal entity. + + :param cluster_resource_id: List of resource ids of clusters that are + following the database owned by this cluster. + :type cluster_resource_id: list[str] + :param database_name: The database name owned by this cluster that was + followed. * in case following all databases. + :type database_name: str + """ + + _attribute_map = { + 'cluster_resource_id': {'key': 'clusterResourceId', 'type': '[str]'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FollowerDatabaseResult, self).__init__(**kwargs) + self.cluster_resource_id = kwargs.get('cluster_resource_id', None) + self.database_name = kwargs.get('database_name', None) diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/follower_database_result_paged.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/follower_database_result_paged.py new file mode 100644 index 000000000000..88c1b411447b --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/follower_database_result_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class FollowerDatabaseResultPaged(Paged): + """ + A paging container for iterating over a list of :class:`FollowerDatabaseResult ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FollowerDatabaseResult]'} + } + + def __init__(self, *args, **kwargs): + + super(FollowerDatabaseResultPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/follower_database_result_py3.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/follower_database_result_py3.py new file mode 100644 index 000000000000..d46a234ce806 --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/follower_database_result_py3.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class FollowerDatabaseResult(Model): + """A class representing database principal entity. + + :param cluster_resource_id: List of resource ids of clusters that are + following the database owned by this cluster. + :type cluster_resource_id: list[str] + :param database_name: The database name owned by this cluster that was + followed. * in case following all databases. + :type database_name: str + """ + + _attribute_map = { + 'cluster_resource_id': {'key': 'clusterResourceId', 'type': '[str]'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, *, cluster_resource_id=None, database_name: str=None, **kwargs) -> None: + super(FollowerDatabaseResult, self).__init__(**kwargs) + self.cluster_resource_id = cluster_resource_id + self.database_name = database_name diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/intelligent_autoscale.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/intelligent_autoscale.py new file mode 100644 index 000000000000..f46105edd7c4 --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/intelligent_autoscale.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class IntelligentAutoscale(Model): + """A class that contains the intelligent auto scale definition. + + All required parameters must be populated in order to send to Azure. + + :param version: Required. The version of the template defined, for + instance 1. + :type version: int + :param minimum: Required. Minimum allowed capacity. + :type minimum: int + :param maximum: Required. Maximum allowed capacity. + :type maximum: int + """ + + _validation = { + 'version': {'required': True}, + 'minimum': {'required': True}, + 'maximum': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'int'}, + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IntelligentAutoscale, self).__init__(**kwargs) + self.version = kwargs.get('version', None) + self.minimum = kwargs.get('minimum', None) + self.maximum = kwargs.get('maximum', None) diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/intelligent_autoscale_py3.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/intelligent_autoscale_py3.py new file mode 100644 index 000000000000..a874b35902ac --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/intelligent_autoscale_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class IntelligentAutoscale(Model): + """A class that contains the intelligent auto scale definition. + + All required parameters must be populated in order to send to Azure. + + :param version: Required. The version of the template defined, for + instance 1. + :type version: int + :param minimum: Required. Minimum allowed capacity. + :type minimum: int + :param maximum: Required. Maximum allowed capacity. + :type maximum: int + """ + + _validation = { + 'version': {'required': True}, + 'minimum': {'required': True}, + 'maximum': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'int'}, + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + } + + def __init__(self, *, version: int, minimum: int, maximum: int, **kwargs) -> None: + super(IntelligentAutoscale, self).__init__(**kwargs) + self.version = version + self.minimum = minimum + self.maximum = maximum diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/kusto_management_client_enums.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/kusto_management_client_enums.py index 1f290c65b053..9d7c686cf779 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/models/kusto_management_client_enums.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/kusto_management_client_enums.py @@ -32,17 +32,29 @@ class ProvisioningState(str, Enum): deleting = "Deleting" succeeded = "Succeeded" failed = "Failed" + moving = "Moving" class AzureSkuName(str, Enum): - d13_v2 = "D13_v2" - d14_v2 = "D14_v2" - l8 = "L8" - l16 = "L16" - d11_v2 = "D11_v2" - d12_v2 = "D12_v2" - l4 = "L4" + standard_ds13_v21_tb_ps = "Standard_DS13_v2+1TB_PS" + standard_ds13_v22_tb_ps = "Standard_DS13_v2+2TB_PS" + standard_ds14_v23_tb_ps = "Standard_DS14_v2+3TB_PS" + standard_ds14_v24_tb_ps = "Standard_DS14_v2+4TB_PS" + standard_d13_v2 = "Standard_D13_v2" + standard_d14_v2 = "Standard_D14_v2" + standard_l8s = "Standard_L8s" + standard_l16s = "Standard_L16s" + standard_d11_v2 = "Standard_D11_v2" + standard_d12_v2 = "Standard_D12_v2" + standard_l4s = "Standard_L4s" + dev_no_sla_standard_d11_v2 = "Dev(No SLA)_Standard_D11_v2" + + +class AzureSkuTier(str, Enum): + + basic = "Basic" + standard = "Standard" class AzureScaleType(str, Enum): @@ -84,6 +96,12 @@ class DatabasePrincipalType(str, Enum): user = "User" +class Type(str, Enum): + + microsoft_kustoclustersdatabases = "Microsoft.Kusto/clusters/databases" + microsoft_kustoclustersattached_database_configurations = "Microsoft.Kusto/clusters/attachedDatabaseConfigurations" + + class Reason(str, Enum): invalid = "Invalid" diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/read_only_attached_database.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/read_only_attached_database.py new file mode 100644 index 000000000000..989cf062fc19 --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/read_only_attached_database.py @@ -0,0 +1,77 @@ +# 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 .database import Database + + +class ReadOnlyAttachedDatabase(Database): + """Class representing a read only attached database. + + 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 - + /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. + :vartype type: str + :param location: Resource location. + :type location: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Moving' + :vartype provisioning_state: str or + ~azure.mgmt.kusto.models.ProvisioningState + :ivar soft_delete_period: The time the data should be kept before it stops + being accessible to queries in TimeSpan. + :vartype soft_delete_period: timedelta + :param hot_cache_period: The time the data should be kept in cache for + fast queries in TimeSpan. + :type hot_cache_period: timedelta + :param statistics: The statistics of the database. + :type statistics: ~azure.mgmt.kusto.models.DatabaseStatistics + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'soft_delete_period': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'soft_delete_period': {'key': 'properties.softDeletePeriod', 'type': 'duration'}, + 'hot_cache_period': {'key': 'properties.hotCachePeriod', 'type': 'duration'}, + 'statistics': {'key': 'properties.statistics', 'type': 'DatabaseStatistics'}, + } + + def __init__(self, **kwargs): + super(ReadOnlyAttachedDatabase, self).__init__(**kwargs) + self.provisioning_state = None + self.soft_delete_period = None + self.hot_cache_period = kwargs.get('hot_cache_period', None) + self.statistics = kwargs.get('statistics', None) + self.kind = 'ReadOnlyAttached' diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/read_only_attached_database_py3.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/read_only_attached_database_py3.py new file mode 100644 index 000000000000..ebc129f35b42 --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/read_only_attached_database_py3.py @@ -0,0 +1,77 @@ +# 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 .database_py3 import Database + + +class ReadOnlyAttachedDatabase(Database): + """Class representing a read only attached database. + + 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 - + /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. + :vartype type: str + :param location: Resource location. + :type location: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Moving' + :vartype provisioning_state: str or + ~azure.mgmt.kusto.models.ProvisioningState + :ivar soft_delete_period: The time the data should be kept before it stops + being accessible to queries in TimeSpan. + :vartype soft_delete_period: timedelta + :param hot_cache_period: The time the data should be kept in cache for + fast queries in TimeSpan. + :type hot_cache_period: timedelta + :param statistics: The statistics of the database. + :type statistics: ~azure.mgmt.kusto.models.DatabaseStatistics + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'soft_delete_period': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'soft_delete_period': {'key': 'properties.softDeletePeriod', 'type': 'duration'}, + 'hot_cache_period': {'key': 'properties.hotCachePeriod', 'type': 'duration'}, + 'statistics': {'key': 'properties.statistics', 'type': 'DatabaseStatistics'}, + } + + def __init__(self, *, location: str=None, hot_cache_period=None, statistics=None, **kwargs) -> None: + super(ReadOnlyAttachedDatabase, self).__init__(location=location, **kwargs) + self.provisioning_state = None + self.soft_delete_period = None + self.hot_cache_period = hot_cache_period + self.statistics = statistics + self.kind = 'ReadOnlyAttached' diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/database_update.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/read_write_database.py similarity index 82% rename from azure-mgmt-kusto/azure/mgmt/kusto/models/database_update.py rename to azure-mgmt-kusto/azure/mgmt/kusto/models/read_write_database.py index cdae04a66d87..23b0ac9b7dee 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/models/database_update.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/read_write_database.py @@ -9,15 +9,17 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .database import Database -class DatabaseUpdate(Resource): - """Class representing an update to a Kusto database. +class ReadWriteDatabase(Database): + """Class representing a read write database. 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 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str @@ -28,15 +30,18 @@ class DatabaseUpdate(Resource): :vartype type: str :param location: Resource location. :type location: str + :param kind: Required. Constant filled by server. + :type kind: str :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed' + values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Moving' :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState :param soft_delete_period: The time the data should be kept before it stops being accessible to queries in TimeSpan. :type soft_delete_period: timedelta - :param hot_cache_period: The time the data that should be kept in cache - for fast queries in TimeSpan. + :param hot_cache_period: The time the data should be kept in cache for + fast queries in TimeSpan. :type hot_cache_period: timedelta :param statistics: The statistics of the database. :type statistics: ~azure.mgmt.kusto.models.DatabaseStatistics @@ -46,6 +51,7 @@ class DatabaseUpdate(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'kind': {'required': True}, 'provisioning_state': {'readonly': True}, } @@ -54,6 +60,7 @@ class DatabaseUpdate(Resource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'soft_delete_period': {'key': 'properties.softDeletePeriod', 'type': 'duration'}, 'hot_cache_period': {'key': 'properties.hotCachePeriod', 'type': 'duration'}, @@ -61,9 +68,9 @@ class DatabaseUpdate(Resource): } def __init__(self, **kwargs): - super(DatabaseUpdate, self).__init__(**kwargs) - self.location = kwargs.get('location', None) + super(ReadWriteDatabase, self).__init__(**kwargs) self.provisioning_state = None self.soft_delete_period = kwargs.get('soft_delete_period', None) self.hot_cache_period = kwargs.get('hot_cache_period', None) self.statistics = kwargs.get('statistics', None) + self.kind = 'ReadWrite' diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/database_update_py3.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/read_write_database_py3.py similarity index 81% rename from azure-mgmt-kusto/azure/mgmt/kusto/models/database_update_py3.py rename to azure-mgmt-kusto/azure/mgmt/kusto/models/read_write_database_py3.py index 6955740924e3..43210ac91d47 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/models/database_update_py3.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/read_write_database_py3.py @@ -9,15 +9,17 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_py3 import Resource +from .database_py3 import Database -class DatabaseUpdate(Resource): - """Class representing an update to a Kusto database. +class ReadWriteDatabase(Database): + """Class representing a read write database. 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 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str @@ -28,15 +30,18 @@ class DatabaseUpdate(Resource): :vartype type: str :param location: Resource location. :type location: str + :param kind: Required. Constant filled by server. + :type kind: str :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed' + values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Moving' :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState :param soft_delete_period: The time the data should be kept before it stops being accessible to queries in TimeSpan. :type soft_delete_period: timedelta - :param hot_cache_period: The time the data that should be kept in cache - for fast queries in TimeSpan. + :param hot_cache_period: The time the data should be kept in cache for + fast queries in TimeSpan. :type hot_cache_period: timedelta :param statistics: The statistics of the database. :type statistics: ~azure.mgmt.kusto.models.DatabaseStatistics @@ -46,6 +51,7 @@ class DatabaseUpdate(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'kind': {'required': True}, 'provisioning_state': {'readonly': True}, } @@ -54,6 +60,7 @@ class DatabaseUpdate(Resource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'soft_delete_period': {'key': 'properties.softDeletePeriod', 'type': 'duration'}, 'hot_cache_period': {'key': 'properties.hotCachePeriod', 'type': 'duration'}, @@ -61,9 +68,9 @@ class DatabaseUpdate(Resource): } def __init__(self, *, location: str=None, soft_delete_period=None, hot_cache_period=None, statistics=None, **kwargs) -> None: - super(DatabaseUpdate, self).__init__(**kwargs) - self.location = location + super(ReadWriteDatabase, self).__init__(location=location, **kwargs) self.provisioning_state = None self.soft_delete_period = soft_delete_period self.hot_cache_period = hot_cache_period self.statistics = statistics + self.kind = 'ReadWrite' diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/sku_description.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/sku_description.py new file mode 100644 index 000000000000..6bb95626c627 --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/sku_description.py @@ -0,0 +1,60 @@ +# 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 msrest.serialization import Model + + +class SkuDescription(Model): + """The Kusto SKU description of given resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The resource type + :vartype resource_type: str + :ivar name: The name of the SKU + :vartype name: str + :ivar tier: The tier of the SKU + :vartype tier: str + :ivar locations: The set of locations that the SKU is available + :vartype locations: list[str] + :ivar location_info: Locations and zones + :vartype location_info: list[~azure.mgmt.kusto.models.SkuLocationInfoItem] + :ivar restrictions: The restrictions because of which SKU cannot be used + :vartype restrictions: list[object] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfoItem]'}, + 'restrictions': {'key': 'restrictions', 'type': '[object]'}, + } + + def __init__(self, **kwargs): + super(SkuDescription, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.locations = None + self.location_info = None + self.restrictions = None diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/azure_sku_paged.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/sku_description_paged.py similarity index 68% rename from azure-mgmt-kusto/azure/mgmt/kusto/models/azure_sku_paged.py rename to azure-mgmt-kusto/azure/mgmt/kusto/models/sku_description_paged.py index e98163c92ebd..1ebdebe372fe 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/models/azure_sku_paged.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/sku_description_paged.py @@ -12,16 +12,16 @@ from msrest.paging import Paged -class AzureSkuPaged(Paged): +class SkuDescriptionPaged(Paged): """ - A paging container for iterating over a list of :class:`AzureSku ` object + A paging container for iterating over a list of :class:`SkuDescription ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AzureSku]'} + 'current_page': {'key': 'value', 'type': '[SkuDescription]'} } def __init__(self, *args, **kwargs): - super(AzureSkuPaged, self).__init__(*args, **kwargs) + super(SkuDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/sku_description_py3.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/sku_description_py3.py new file mode 100644 index 000000000000..156a526d333c --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/sku_description_py3.py @@ -0,0 +1,60 @@ +# 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 msrest.serialization import Model + + +class SkuDescription(Model): + """The Kusto SKU description of given resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The resource type + :vartype resource_type: str + :ivar name: The name of the SKU + :vartype name: str + :ivar tier: The tier of the SKU + :vartype tier: str + :ivar locations: The set of locations that the SKU is available + :vartype locations: list[str] + :ivar location_info: Locations and zones + :vartype location_info: list[~azure.mgmt.kusto.models.SkuLocationInfoItem] + :ivar restrictions: The restrictions because of which SKU cannot be used + :vartype restrictions: list[object] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfoItem]'}, + 'restrictions': {'key': 'restrictions', 'type': '[object]'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuDescription, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.locations = None + self.location_info = None + self.restrictions = None diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/sku_location_info_item.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/sku_location_info_item.py new file mode 100644 index 000000000000..89ef6bb1dfb3 --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/sku_location_info_item.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class SkuLocationInfoItem(Model): + """The locations and zones info for SKU. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The available location of the SKU. + :type location: str + :param zones: The available zone of the SKU. + :type zones: list[str] + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(SkuLocationInfoItem, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.zones = kwargs.get('zones', None) diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/models/sku_location_info_item_py3.py b/azure-mgmt-kusto/azure/mgmt/kusto/models/sku_location_info_item_py3.py new file mode 100644 index 000000000000..7e60b635e7d8 --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/models/sku_location_info_item_py3.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class SkuLocationInfoItem(Model): + """The locations and zones info for SKU. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The available location of the SKU. + :type location: str + :param zones: The available zone of the SKU. + :type zones: list[str] + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, zones=None, **kwargs) -> None: + super(SkuLocationInfoItem, self).__init__(**kwargs) + self.location = location + self.zones = zones diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py b/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py index e3188e0bfd7f..655d8473c5a3 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py @@ -11,12 +11,14 @@ from .clusters_operations import ClustersOperations from .databases_operations import DatabasesOperations +from .attached_database_configurations_operations import AttachedDatabaseConfigurationsOperations from .data_connections_operations import DataConnectionsOperations from .operations import Operations __all__ = [ 'ClustersOperations', 'DatabasesOperations', + 'AttachedDatabaseConfigurationsOperations', 'DataConnectionsOperations', 'Operations', ] diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/operations/attached_database_configurations_operations.py b/azure-mgmt-kusto/azure/mgmt/kusto/operations/attached_database_configurations_operations.py new file mode 100644 index 000000000000..4429eb0301a7 --- /dev/null +++ b/azure-mgmt-kusto/azure/mgmt/kusto/operations/attached_database_configurations_operations.py @@ -0,0 +1,376 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class AttachedDatabaseConfigurationsOperations(object): + """AttachedDatabaseConfigurationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client API Version. Constant value: "2019-01-21". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-21" + + self.config = config + + def list_by_cluster( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): + """Returns the list of attached database configurations of the given Kusto + cluster. + + :param resource_group_name: The name of the resource group containing + the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AttachedDatabaseConfiguration + :rtype: + ~azure.mgmt.kusto.models.AttachedDatabaseConfigurationPaged[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_cluster.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.AttachedDatabaseConfigurationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AttachedDatabaseConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations'} + + def get( + self, resource_group_name, cluster_name, attached_database_configuration_name, custom_headers=None, raw=False, **operation_config): + """Returns an attached database configuration. + + :param resource_group_name: The name of the resource group containing + the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param attached_database_configuration_name: The name of the attached + database configuration. + :type attached_database_configuration_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AttachedDatabaseConfiguration or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + '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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AttachedDatabaseConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}'} + + + def _create_or_update_initial( + self, resource_group_name, cluster_name, attached_database_configuration_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + '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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AttachedDatabaseConfiguration') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AttachedDatabaseConfiguration', response) + if response.status_code == 201: + deserialized = self._deserialize('AttachedDatabaseConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, cluster_name, attached_database_configuration_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates an attached database configuration. + + :param resource_group_name: The name of the resource group containing + the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param attached_database_configuration_name: The name of the attached + database configuration. + :type attached_database_configuration_name: str + :param parameters: The database parameters supplied to the + CreateOrUpdate operation. + :type parameters: + ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + AttachedDatabaseConfiguration or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + attached_database_configuration_name=attached_database_configuration_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AttachedDatabaseConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}'} + + + def _delete_initial( + self, resource_group_name, cluster_name, attached_database_configuration_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + '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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, cluster_name, attached_database_configuration_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the attached database configuration with the given name. + + :param resource_group_name: The name of the resource group containing + the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param attached_database_configuration_name: The name of the attached + database configuration. + :type attached_database_configuration_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + attached_database_configuration_name=attached_database_configuration_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}'} diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/operations/clusters_operations.py b/azure-mgmt-kusto/azure/mgmt/kusto/operations/clusters_operations.py index cc6cc68cba10..7b19e4eae3cc 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/operations/clusters_operations.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/operations/clusters_operations.py @@ -550,6 +550,161 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/start'} + def list_follower_databases( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): + """Returns a list of databases that are owned by this cluster and were + followed by another cluster. + + :param resource_group_name: The name of the resource group containing + the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FollowerDatabaseResult + :rtype: + ~azure.mgmt.kusto.models.FollowerDatabaseResultPaged[~azure.mgmt.kusto.models.FollowerDatabaseResult] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_follower_databases.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.FollowerDatabaseResultPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.FollowerDatabaseResultPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_follower_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases'} + + def detach_follower_databases( + self, resource_group_name, cluster_name, cluster_resource_id, database_name, custom_headers=None, raw=False, **operation_config): + """Detaches all followers of a database owned by this cluster. + + :param resource_group_name: The name of the resource group containing + the Kusto cluster. + :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 database_name: The database name owned by this cluster that was + followed. * in case following all databases. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of FollowerDatabaseResult + :rtype: + ~azure.mgmt.kusto.models.FollowerDatabaseResultPaged[~azure.mgmt.kusto.models.FollowerDatabaseResult] + :raises: :class:`CloudError` + """ + follower_databases_to_remove = models.FollowerDatabaseRequest(cluster_resource_id=cluster_resource_id, database_name=database_name) + + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.detach_follower_databases.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(follower_databases_to_remove, 'FollowerDatabaseRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.FollowerDatabaseResultPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.FollowerDatabaseResultPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + detach_follower_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases'} + def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): """Lists all Kusto clusters within a resource group. @@ -691,9 +846,9 @@ def list_skus( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of AzureSku + :return: An iterator like instance of SkuDescription :rtype: - ~azure.mgmt.kusto.models.AzureSkuPaged[~azure.mgmt.kusto.models.AzureSku] + ~azure.mgmt.kusto.models.SkuDescriptionPaged[~azure.mgmt.kusto.models.SkuDescription] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -736,11 +891,11 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AzureSkuPaged(internal_paging, self._deserialize.dependencies) + deserialized = models.SkuDescriptionPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.AzureSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.SkuDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized diff --git a/azure-mgmt-kusto/azure/mgmt/kusto/operations/databases_operations.py b/azure-mgmt-kusto/azure/mgmt/kusto/operations/databases_operations.py index fa2fcb350575..10464d6c1323 100644 --- a/azure-mgmt-kusto/azure/mgmt/kusto/operations/databases_operations.py +++ b/azure-mgmt-kusto/azure/mgmt/kusto/operations/databases_operations.py @@ -40,7 +40,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def check_name_availability( - self, resource_group_name, cluster_name, name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, cluster_name, name, type, custom_headers=None, raw=False, **operation_config): """Checks that the database name is valid and is not already in use. :param resource_group_name: The name of the resource group containing @@ -48,8 +48,13 @@ def check_name_availability( :type resource_group_name: str :param cluster_name: The name of the Kusto cluster. :type cluster_name: str - :param name: Database name. + :param name: Resource name. :type name: str + :param type: The type of resource, for instance + Microsoft.Kusto/clusters/databases. Possible values include: + 'Microsoft.Kusto/clusters/databases', + 'Microsoft.Kusto/clusters/attachedDatabaseConfigurations' + :type type: str or ~azure.mgmt.kusto.models.Type :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -60,7 +65,7 @@ def check_name_availability( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - database_name = models.DatabaseCheckNameRequest(name=name) + resource_name = models.CheckNameRequest(name=name, type=type) # Construct URL url = self.check_name_availability.metadata['url'] @@ -87,7 +92,7 @@ def check_name_availability( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(database_name, 'DatabaseCheckNameRequest') + body_content = self._serialize.body(resource_name, 'CheckNameRequest') # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -384,7 +389,7 @@ def _update_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'DatabaseUpdate') + body_content = self._serialize.body(parameters, 'Database') # Construct and send request request = self._client.patch(url, query_parameters, header_parameters, body_content) @@ -421,7 +426,7 @@ def update( :type database_name: str :param parameters: The database parameters supplied to the Update operation. - :type parameters: ~azure.mgmt.kusto.models.DatabaseUpdate + :type parameters: ~azure.mgmt.kusto.models.Database :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response