Skip to content

[AutoPR azure-kusto/resource-manager] Kusto: Added more features such as: database operations, check cluste… #3380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
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
7 changes: 6 additions & 1 deletion 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.event_hub_connections_operations import EventHubConnectionsOperations
from .operations.operations import Operations
from . import models

Expand Down Expand Up @@ -63,6 +64,8 @@ class KustoManagementClient(SDKClient):
:vartype clusters: azure.mgmt.kusto.operations.ClustersOperations
:ivar databases: Databases operations
:vartype databases: azure.mgmt.kusto.operations.DatabasesOperations
:ivar event_hub_connections: EventHubConnections operations
:vartype event_hub_connections: azure.mgmt.kusto.operations.EventHubConnectionsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.kusto.operations.Operations

Expand All @@ -83,13 +86,15 @@ def __init__(
super(KustoManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2017-09-07-privatepreview'
self.api_version = '2018-09-07-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.clusters = ClustersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.databases = DatabasesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.event_hub_connections = EventHubConnectionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
74 changes: 71 additions & 3 deletions azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,115 @@
# --------------------------------------------------------------------------

try:
from .trusted_external_tenant_py3 import TrustedExternalTenant
from .azure_sku_py3 import AzureSku
from .azure_capacity_py3 import AzureCapacity
from .azure_resource_sku_py3 import AzureResourceSku
from .database_statistics_py3 import DatabaseStatistics
from .event_hub_connection_validation_py3 import EventHubConnectionValidation
from .cluster_py3 import Cluster
from .cluster_update_py3 import ClusterUpdate
from .database_py3 import Database
from .database_update_py3 import DatabaseUpdate
from .database_principal_py3 import DatabasePrincipal
from .event_hub_connection_update_py3 import EventHubConnectionUpdate
from .event_hub_connection_py3 import EventHubConnection
from .event_hub_connection_validation_result_py3 import EventHubConnectionValidationResult
from .database_principal_list_result_py3 import DatabasePrincipalListResult
from .database_principal_list_request_py3 import DatabasePrincipalListRequest
from .event_hub_connection_validation_list_result_py3 import EventHubConnectionValidationListResult
from .cluster_check_name_request_py3 import ClusterCheckNameRequest
from .database_check_name_request_py3 import DatabaseCheckNameRequest
from .check_name_result_py3 import CheckNameResult
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .proxy_resource_py3 import ProxyResource
from .tracked_resource_py3 import TrackedResource
from .azure_entity_resource_py3 import AzureEntityResource
from .resource_py3 import Resource
from .proxy_resource_py3 import ProxyResource
except (SyntaxError, ImportError):
from .trusted_external_tenant import TrustedExternalTenant
from .azure_sku import AzureSku
from .azure_capacity import AzureCapacity
from .azure_resource_sku import AzureResourceSku
from .database_statistics import DatabaseStatistics
from .event_hub_connection_validation import EventHubConnectionValidation
from .cluster import Cluster
from .cluster_update import ClusterUpdate
from .database import Database
from .database_update import DatabaseUpdate
from .database_principal import DatabasePrincipal
from .event_hub_connection_update import EventHubConnectionUpdate
from .event_hub_connection import EventHubConnection
from .event_hub_connection_validation_result import EventHubConnectionValidationResult
from .database_principal_list_result import DatabasePrincipalListResult
from .database_principal_list_request import DatabasePrincipalListRequest
from .event_hub_connection_validation_list_result import EventHubConnectionValidationListResult
from .cluster_check_name_request import ClusterCheckNameRequest
from .database_check_name_request import DatabaseCheckNameRequest
from .check_name_result import CheckNameResult
from .operation_display import OperationDisplay
from .operation import Operation
from .proxy_resource import ProxyResource
from .tracked_resource import TrackedResource
from .azure_entity_resource import AzureEntityResource
from .resource import Resource
from .proxy_resource import ProxyResource
from .cluster_paged import ClusterPaged
from .azure_sku_paged import AzureSkuPaged
from .azure_resource_sku_paged import AzureResourceSkuPaged
from .database_paged import DatabasePaged
from .database_principal_paged import DatabasePrincipalPaged
from .event_hub_connection_paged import EventHubConnectionPaged
from .operation_paged import OperationPaged
from .kusto_management_client_enums import (
State,
ProvisioningState,
AzureSkuName,
AzureScaleType,
DataFormat,
DatabasePrincipalRole,
DatabasePrincipalType,
)

__all__ = [
'TrustedExternalTenant',
'AzureSku',
'AzureCapacity',
'AzureResourceSku',
'DatabaseStatistics',
'EventHubConnectionValidation',
'Cluster',
'ClusterUpdate',
'Database',
'DatabaseUpdate',
'DatabasePrincipal',
'EventHubConnectionUpdate',
'EventHubConnection',
'EventHubConnectionValidationResult',
'DatabasePrincipalListResult',
'DatabasePrincipalListRequest',
'EventHubConnectionValidationListResult',
'ClusterCheckNameRequest',
'DatabaseCheckNameRequest',
'CheckNameResult',
'OperationDisplay',
'Operation',
'ProxyResource',
'TrackedResource',
'AzureEntityResource',
'Resource',
'ProxyResource',
'ClusterPaged',
'AzureSkuPaged',
'AzureResourceSkuPaged',
'DatabasePaged',
'DatabasePrincipalPaged',
'EventHubConnectionPaged',
'OperationPaged',
'State',
'ProvisioningState',
'AzureSkuName',
'AzureScaleType',
'DataFormat',
'DatabasePrincipalRole',
'DatabasePrincipalType',
]
50 changes: 50 additions & 0 deletions azure-mgmt-kusto/azure/mgmt/kusto/models/azure_capacity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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 AzureCapacity(Model):
"""AzureCapacity.

All required parameters must be populated in order to send to Azure.

:param scale_type: Required. Scale type. Possible values include:
'automatic', 'manual', 'none'
:type scale_type: str or ~azure.mgmt.kusto.models.AzureScaleType
:param minimum: Required. Minimum allowed capacity.
:type minimum: int
:param maximum: Required. Maximum allowed capacity.
:type maximum: int
:param default: Required. The default capacity that would be used.
:type default: int
"""

_validation = {
'scale_type': {'required': True},
'minimum': {'required': True},
'maximum': {'required': True},
'default': {'required': True},
}

_attribute_map = {
'scale_type': {'key': 'scaleType', 'type': 'str'},
'minimum': {'key': 'minimum', 'type': 'int'},
'maximum': {'key': 'maximum', 'type': 'int'},
'default': {'key': 'default', 'type': 'int'},
}

def __init__(self, **kwargs):
super(AzureCapacity, self).__init__(**kwargs)
self.scale_type = kwargs.get('scale_type', None)
self.minimum = kwargs.get('minimum', None)
self.maximum = kwargs.get('maximum', None)
self.default = kwargs.get('default', None)
50 changes: 50 additions & 0 deletions azure-mgmt-kusto/azure/mgmt/kusto/models/azure_capacity_py3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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 AzureCapacity(Model):
"""AzureCapacity.

All required parameters must be populated in order to send to Azure.

:param scale_type: Required. Scale type. Possible values include:
'automatic', 'manual', 'none'
:type scale_type: str or ~azure.mgmt.kusto.models.AzureScaleType
:param minimum: Required. Minimum allowed capacity.
:type minimum: int
:param maximum: Required. Maximum allowed capacity.
:type maximum: int
:param default: Required. The default capacity that would be used.
:type default: int
"""

_validation = {
'scale_type': {'required': True},
'minimum': {'required': True},
'maximum': {'required': True},
'default': {'required': True},
}

_attribute_map = {
'scale_type': {'key': 'scaleType', 'type': 'str'},
'minimum': {'key': 'minimum', 'type': 'int'},
'maximum': {'key': 'maximum', 'type': 'int'},
'default': {'key': 'default', 'type': 'int'},
}

def __init__(self, *, scale_type, minimum: int, maximum: int, default: int, **kwargs) -> None:
super(AzureCapacity, self).__init__(**kwargs)
self.scale_type = scale_type
self.minimum = minimum
self.maximum = maximum
self.default = default
36 changes: 36 additions & 0 deletions azure-mgmt-kusto/azure/mgmt/kusto/models/azure_resource_sku.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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 AzureResourceSku(Model):
"""AzureResourceSku.

:param resource_type: Resource Namespace and Type.
:type resource_type: str
:param sku: The SKU details.
:type sku: ~azure.mgmt.kusto.models.AzureSku
:param capacity: The SKU capacity.
:type capacity: ~azure.mgmt.kusto.models.AzureCapacity
"""

_attribute_map = {
'resource_type': {'key': 'resourceType', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'AzureSku'},
'capacity': {'key': 'capacity', 'type': 'AzureCapacity'},
}

def __init__(self, **kwargs):
super(AzureResourceSku, self).__init__(**kwargs)
self.resource_type = kwargs.get('resource_type', None)
self.sku = kwargs.get('sku', None)
self.capacity = kwargs.get('capacity', 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 AzureResourceSkuPaged(Paged):
"""
A paging container for iterating over a list of :class:`AzureResourceSku <azure.mgmt.kusto.models.AzureResourceSku>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[AzureResourceSku]'}
}

def __init__(self, *args, **kwargs):

super(AzureResourceSkuPaged, self).__init__(*args, **kwargs)
36 changes: 36 additions & 0 deletions azure-mgmt-kusto/azure/mgmt/kusto/models/azure_resource_sku_py3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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 AzureResourceSku(Model):
"""AzureResourceSku.

:param resource_type: Resource Namespace and Type.
:type resource_type: str
:param sku: The SKU details.
:type sku: ~azure.mgmt.kusto.models.AzureSku
:param capacity: The SKU capacity.
:type capacity: ~azure.mgmt.kusto.models.AzureCapacity
"""

_attribute_map = {
'resource_type': {'key': 'resourceType', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'AzureSku'},
'capacity': {'key': 'capacity', 'type': 'AzureCapacity'},
}

def __init__(self, *, resource_type: str=None, sku=None, capacity=None, **kwargs) -> None:
super(AzureResourceSku, self).__init__(**kwargs)
self.resource_type = resource_type
self.sku = sku
self.capacity = capacity
Loading