Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions azure-mgmt-kusto/azure/mgmt/kusto/kusto_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down
45 changes: 37 additions & 8 deletions azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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',
Expand All @@ -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',
]
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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 <azure.mgmt.kusto.models.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)
Original file line number Diff line number Diff line change
@@ -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
20 changes: 10 additions & 10 deletions azure-mgmt-kusto/azure/mgmt/kusto/models/azure_sku.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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)
Loading