From 8dd26ca67d4f4343f89de320f85b5943d33c7050 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Thu, 29 Apr 2021 16:16:39 +0800 Subject: [PATCH] [AutoRelease] t1-kusto-2021-04-26-32969 (#18296) * CodeGen from PR 13306 in Azure/azure-rest-api-specs [Hub Generated] Review request for Microsoft.Kusto to add version stable/2021-01-01 (#13306) * Add new api version 2021 * remove managedIdentity since we won't support it in this version * CR comments * Add default value for contine on errros * Fix swagger correctness issues * Fix typo * version,CHANGELOG * test * a test skip Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines Co-authored-by: Zed <601306339@qq.com> --- sdk/kusto/azure-mgmt-kusto/CHANGELOG.md | 15 + sdk/kusto/azure-mgmt-kusto/MANIFEST.in | 1 + sdk/kusto/azure-mgmt-kusto/_meta.json | 8 + .../mgmt/kusto/_kusto_management_client.py | 12 +- .../azure/mgmt/kusto/models/__init__.py | 21 + .../models/_kusto_management_client_enums.py | 21 +- .../azure/mgmt/kusto/models/_models.py | 483 +++- .../azure/mgmt/kusto/models/_models_py3.py | 493 +++- .../azure/mgmt/kusto/models/_paged_models.py | 13 + .../azure/mgmt/kusto/operations/__init__.py | 4 + ...ched_database_configurations_operations.py | 4 +- ...luster_principal_assignments_operations.py | 4 +- .../kusto/operations/_clusters_operations.py | 35 +- .../_data_connections_operations.py | 4 +- ...tabase_principal_assignments_operations.py | 4 +- .../kusto/operations/_databases_operations.py | 4 +- .../mgmt/kusto/operations/_operations.py | 4 +- .../_operations_results_operations.py | 101 + .../kusto/operations/_scripts_operations.py | 573 +++++ .../azure/mgmt/kusto/version.py | 2 +- ...st_cli_mgmt_kusto.test_kusto_adjusted.yaml | 2241 +---------------- .../tests/test_cli_mgmt_kusto.py | 1 + 22 files changed, 1570 insertions(+), 2478 deletions(-) create mode 100644 sdk/kusto/azure-mgmt-kusto/_meta.json create mode 100644 sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_operations.py create mode 100644 sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_scripts_operations.py diff --git a/sdk/kusto/azure-mgmt-kusto/CHANGELOG.md b/sdk/kusto/azure-mgmt-kusto/CHANGELOG.md index e44cecd5b0c6..e11c467ada1b 100644 --- a/sdk/kusto/azure-mgmt-kusto/CHANGELOG.md +++ b/sdk/kusto/azure-mgmt-kusto/CHANGELOG.md @@ -1,5 +1,20 @@ # Release History +## 0.11.0 (2021-04-26) + +**Features** + + - Model AttachedDatabaseConfiguration has a new parameter table_level_sharing_properties + - Model Cluster has a new parameter etag + - Model EventHubDataConnection has a new parameter managed_identity_resource_id + - Added operation group ScriptsOperations + - Added operation group OperationsResultsOperations + +**Breaking changes** + + - Operation ClustersOperations.update has a new signature + - Operation ClustersOperations.create_or_update has a new signature + ## 0.10.0 (2020-10-23) **Features** diff --git a/sdk/kusto/azure-mgmt-kusto/MANIFEST.in b/sdk/kusto/azure-mgmt-kusto/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/kusto/azure-mgmt-kusto/MANIFEST.in +++ b/sdk/kusto/azure-mgmt-kusto/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/kusto/azure-mgmt-kusto/_meta.json b/sdk/kusto/azure-mgmt-kusto/_meta.json new file mode 100644 index 000000000000..492966f2b5e3 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "a582c2ee04394bf87fa02c562a1a526d83424b27", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/azure-kusto/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "readme": "specification/azure-kusto/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_kusto_management_client.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_kusto_management_client.py index 782bee0f4f29..8d17a1745b36 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_kusto_management_client.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_kusto_management_client.py @@ -17,9 +17,11 @@ from .operations import ClusterPrincipalAssignmentsOperations from .operations import DatabasesOperations from .operations import DatabasePrincipalAssignmentsOperations +from .operations import ScriptsOperations from .operations import AttachedDatabaseConfigurationsOperations from .operations import DataConnectionsOperations from .operations import Operations +from .operations import OperationsResultsOperations from . import models @@ -37,12 +39,16 @@ class KustoManagementClient(SDKClient): :vartype databases: azure.mgmt.kusto.operations.DatabasesOperations :ivar database_principal_assignments: DatabasePrincipalAssignments operations :vartype database_principal_assignments: azure.mgmt.kusto.operations.DatabasePrincipalAssignmentsOperations + :ivar scripts: Scripts operations + :vartype scripts: azure.mgmt.kusto.operations.ScriptsOperations :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 :vartype operations: azure.mgmt.kusto.operations.Operations + :ivar operations_results: OperationsResults operations + :vartype operations_results: azure.mgmt.kusto.operations.OperationsResultsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -61,7 +67,7 @@ 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 = '2020-09-18' + self.api_version = '2021-01-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -73,9 +79,13 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.database_principal_assignments = DatabasePrincipalAssignmentsOperations( self._client, self.config, self._serialize, self._deserialize) + self.scripts = ScriptsOperations( + 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( self._client, self.config, self._serialize, self._deserialize) + self.operations_results = OperationsResultsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py index c84307e11514..56374e0a1d5d 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py @@ -46,13 +46,18 @@ from ._models_py3 import LanguageExtensionsList from ._models_py3 import Operation from ._models_py3 import OperationDisplay + from ._models_py3 import OperationResult from ._models_py3 import OptimizedAutoscale from ._models_py3 import ProxyResource from ._models_py3 import ReadOnlyFollowingDatabase from ._models_py3 import ReadWriteDatabase from ._models_py3 import Resource + from ._models_py3 import Script + from ._models_py3 import ScriptCheckNameRequest from ._models_py3 import SkuDescription from ._models_py3 import SkuLocationInfoItem + from ._models_py3 import SystemData + from ._models_py3 import TableLevelSharingProperties from ._models_py3 import TrackedResource from ._models_py3 import TrustedExternalTenant from ._models_py3 import VirtualNetworkConfiguration @@ -93,13 +98,18 @@ from ._models import LanguageExtensionsList from ._models import Operation from ._models import OperationDisplay + from ._models import OperationResult from ._models import OptimizedAutoscale from ._models import ProxyResource from ._models import ReadOnlyFollowingDatabase from ._models import ReadWriteDatabase from ._models import Resource + from ._models import Script + from ._models import ScriptCheckNameRequest from ._models import SkuDescription from ._models import SkuLocationInfoItem + from ._models import SystemData + from ._models import TableLevelSharingProperties from ._models import TrackedResource from ._models import TrustedExternalTenant from ._models import VirtualNetworkConfiguration @@ -114,6 +124,7 @@ from ._paged_models import FollowerDatabaseDefinitionPaged from ._paged_models import LanguageExtensionPaged from ._paged_models import OperationPaged +from ._paged_models import ScriptPaged from ._paged_models import SkuDescriptionPaged from ._kusto_management_client_enums import ( State, @@ -135,8 +146,10 @@ DatabasePrincipalType, PrincipalType, ClusterPrincipalRole, + CreatedByType, Type, Reason, + Status, ) __all__ = [ @@ -176,13 +189,18 @@ 'LanguageExtensionsList', 'Operation', 'OperationDisplay', + 'OperationResult', 'OptimizedAutoscale', 'ProxyResource', 'ReadOnlyFollowingDatabase', 'ReadWriteDatabase', 'Resource', + 'Script', + 'ScriptCheckNameRequest', 'SkuDescription', 'SkuLocationInfoItem', + 'SystemData', + 'TableLevelSharingProperties', 'TrackedResource', 'TrustedExternalTenant', 'VirtualNetworkConfiguration', @@ -195,6 +213,7 @@ 'DatabasePaged', 'DatabasePrincipalPaged', 'DatabasePrincipalAssignmentPaged', + 'ScriptPaged', 'AttachedDatabaseConfigurationPaged', 'DataConnectionPaged', 'OperationPaged', @@ -217,6 +236,8 @@ 'DatabasePrincipalType', 'PrincipalType', 'ClusterPrincipalRole', + 'CreatedByType', 'Type', 'Reason', + 'Status', ] diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_kusto_management_client_enums.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_kusto_management_client_enums.py index b9bc2cdde484..775d9f5e1959 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_kusto_management_client_enums.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_kusto_management_client_enums.py @@ -57,11 +57,14 @@ class AzureSkuName(str, Enum): standard_d14_v2 = "Standard_D14_v2" standard_l8s = "Standard_L8s" standard_l16s = "Standard_L16s" + standard_l8s_v2 = "Standard_L8s_v2" + standard_l16s_v2 = "Standard_L16s_v2" 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" standard_e64i_v3 = "Standard_E64i_v3" + standard_e80ids_v4 = "Standard_E80ids_v4" standard_e2a_v4 = "Standard_E2a_v4" standard_e4a_v4 = "Standard_E4a_v4" standard_e8a_v4 = "Standard_E8a_v4" @@ -186,7 +189,7 @@ class DatabasePrincipalRole(str, Enum): ingestor = "Ingestor" monitor = "Monitor" user = "User" - unrestricted_viewers = "UnrestrictedViewers" + unrestricted_viewer = "UnrestrictedViewer" viewer = "Viewer" @@ -210,6 +213,14 @@ class ClusterPrincipalRole(str, Enum): all_databases_viewer = "AllDatabasesViewer" +class CreatedByType(str, Enum): + + user = "User" + application = "Application" + managed_identity = "ManagedIdentity" + key = "Key" + + class Type(str, Enum): microsoft_kustoclustersdatabases = "Microsoft.Kusto/clusters/databases" @@ -220,3 +231,11 @@ class Reason(str, Enum): invalid = "Invalid" already_exists = "AlreadyExists" + + +class Status(str, Enum): + + succeeded = "Succeeded" + canceled = "Canceled" + failed = "Failed" + running = "Running" diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models.py index 4f2511e4301e..9ea80c42da87 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models.py @@ -16,16 +16,19 @@ class Resource(Model): """Resource. + Common fields that are returned in the response for all Azure Resource + Manager resources. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -49,19 +52,21 @@ def __init__(self, **kwargs): class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -89,20 +94,20 @@ class AttachedDatabaseConfiguration(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param location: Resource location. :type location: str - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState :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 @@ -119,13 +124,15 @@ class AttachedDatabaseConfiguration(ProxyResource): 'None' :type default_principals_modification_kind: str or ~azure.mgmt.kusto.models.DefaultPrincipalsModificationKind + :param table_level_sharing_properties: Table level sharing specifications + :type table_level_sharing_properties: + ~azure.mgmt.kusto.models.TableLevelSharingProperties """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, 'database_name': {'required': True}, 'cluster_resource_id': {'required': True}, 'attached_database_names': {'readonly': True}, @@ -142,16 +149,18 @@ class AttachedDatabaseConfiguration(ProxyResource): 'cluster_resource_id': {'key': 'properties.clusterResourceId', 'type': 'str'}, 'attached_database_names': {'key': 'properties.attachedDatabaseNames', 'type': '[str]'}, 'default_principals_modification_kind': {'key': 'properties.defaultPrincipalsModificationKind', 'type': 'str'}, + 'table_level_sharing_properties': {'key': 'properties.tableLevelSharingProperties', 'type': 'TableLevelSharingProperties'}, } def __init__(self, **kwargs): super(AttachedDatabaseConfiguration, self).__init__(**kwargs) self.location = kwargs.get('location', None) - self.provisioning_state = None + self.provisioning_state = kwargs.get('provisioning_state', None) self.database_name = kwargs.get('database_name', None) self.cluster_resource_id = kwargs.get('cluster_resource_id', None) self.attached_database_names = None self.default_principals_modification_kind = kwargs.get('default_principals_modification_kind', None) + self.table_level_sharing_properties = kwargs.get('table_level_sharing_properties', None) class AzureCapacity(Model): @@ -193,19 +202,21 @@ def __init__(self, **kwargs): class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. + """Entity Resource. + + The resource model definition for an Azure Resource Manager resource with + an etag. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar etag: Resource Etag. :vartype etag: str @@ -262,12 +273,13 @@ class AzureSku(Model): :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', - 'Standard_E64i_v3', 'Standard_E2a_v4', 'Standard_E4a_v4', - 'Standard_E8a_v4', 'Standard_E16a_v4', 'Standard_E8as_v4+1TB_PS', - 'Standard_E8as_v4+2TB_PS', 'Standard_E16as_v4+3TB_PS', - 'Standard_E16as_v4+4TB_PS', 'Dev(No SLA)_Standard_E2a_v4' + 'Standard_D14_v2', 'Standard_L8s', 'Standard_L16s', 'Standard_L8s_v2', + 'Standard_L16s_v2', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_L4s', + 'Dev(No SLA)_Standard_D11_v2', 'Standard_E64i_v3', 'Standard_E80ids_v4', + 'Standard_E2a_v4', 'Standard_E4a_v4', 'Standard_E8a_v4', + 'Standard_E16a_v4', 'Standard_E8as_v4+1TB_PS', 'Standard_E8as_v4+2TB_PS', + 'Standard_E16as_v4+3TB_PS', 'Standard_E16as_v4+4TB_PS', 'Dev(No + SLA)_Standard_E2a_v4' :type name: str or ~azure.mgmt.kusto.models.AzureSkuName :param capacity: The number of instances of the cluster. :type capacity: int @@ -415,20 +427,23 @@ def __init__(self, **kwargs): class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """Tracked Resource. + + The resource model definition for an Azure Resource Manager tracked top + level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -465,13 +480,13 @@ class Cluster(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -487,10 +502,10 @@ class Cluster(TrackedResource): 'Creating', 'Unavailable', 'Running', 'Deleting', 'Deleted', 'Stopping', 'Stopped', 'Starting', 'Updating' :vartype state: str or ~azure.mgmt.kusto.models.State - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState :ivar uri: The cluster URI. :vartype uri: str @@ -504,7 +519,7 @@ class Cluster(TrackedResource): :param optimized_autoscale: Optimized auto scale definition. :type optimized_autoscale: ~azure.mgmt.kusto.models.OptimizedAutoscale :param enable_disk_encryption: A boolean value that indicates if the - cluster's disks are encrypted. + cluster's disks are encrypted. Default value: False . :type enable_disk_encryption: bool :param enable_streaming_ingest: A boolean value that indicates if the streaming ingest is enabled. Default value: False . @@ -524,8 +539,12 @@ class Cluster(TrackedResource): :param enable_double_encryption: A boolean value that indicates if double encryption is enabled. Default value: False . :type enable_double_encryption: bool - :param engine_type: The engine type. Possible values include: 'V2', 'V3' + :param engine_type: The engine type. Possible values include: 'V2', 'V3'. + Default value: "V3" . :type engine_type: str or ~azure.mgmt.kusto.models.EngineType + :ivar etag: A unique read-only string that changes whenever the resource + is updated. + :vartype etag: str """ _validation = { @@ -535,11 +554,11 @@ class Cluster(TrackedResource): 'location': {'required': True}, 'sku': {'required': True}, 'state': {'readonly': True}, - 'provisioning_state': {'readonly': True}, 'uri': {'readonly': True}, 'data_ingestion_uri': {'readonly': True}, 'state_reason': {'readonly': True}, 'language_extensions': {'readonly': True}, + 'etag': {'readonly': True}, } _attribute_map = { @@ -566,6 +585,7 @@ class Cluster(TrackedResource): 'language_extensions': {'key': 'properties.languageExtensions', 'type': 'LanguageExtensionsList'}, 'enable_double_encryption': {'key': 'properties.enableDoubleEncryption', 'type': 'bool'}, 'engine_type': {'key': 'properties.engineType', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, } def __init__(self, **kwargs): @@ -574,20 +594,21 @@ def __init__(self, **kwargs): self.zones = kwargs.get('zones', None) self.identity = kwargs.get('identity', None) self.state = None - self.provisioning_state = None + self.provisioning_state = kwargs.get('provisioning_state', None) self.uri = None self.data_ingestion_uri = None self.state_reason = None self.trusted_external_tenants = kwargs.get('trusted_external_tenants', None) self.optimized_autoscale = kwargs.get('optimized_autoscale', None) - self.enable_disk_encryption = kwargs.get('enable_disk_encryption', None) + self.enable_disk_encryption = kwargs.get('enable_disk_encryption', False) self.enable_streaming_ingest = kwargs.get('enable_streaming_ingest', False) self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) self.key_vault_properties = kwargs.get('key_vault_properties', None) self.enable_purge = kwargs.get('enable_purge', False) self.language_extensions = None self.enable_double_encryption = kwargs.get('enable_double_encryption', False) - self.engine_type = kwargs.get('engine_type', None) + self.engine_type = kwargs.get('engine_type', "V3") + self.etag = None class ClusterCheckNameRequest(Model): @@ -630,13 +651,13 @@ class ClusterPrincipalAssignment(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param principal_id: Required. The principal ID assigned to the cluster principal. It can be a user email, application ID, or security group name. @@ -653,10 +674,10 @@ class ClusterPrincipalAssignment(ProxyResource): :vartype tenant_name: str :ivar principal_name: The principal name :vartype principal_name: str - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState """ @@ -669,7 +690,6 @@ class ClusterPrincipalAssignment(ProxyResource): 'principal_type': {'required': True}, 'tenant_name': {'readonly': True}, 'principal_name': {'readonly': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { @@ -693,7 +713,7 @@ def __init__(self, **kwargs): self.principal_type = kwargs.get('principal_type', None) self.tenant_name = None self.principal_name = None - self.provisioning_state = None + self.provisioning_state = kwargs.get('provisioning_state', None) class ClusterPrincipalAssignmentCheckNameRequest(Model): @@ -735,13 +755,13 @@ class ClusterUpdate(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -755,10 +775,10 @@ class ClusterUpdate(Resource): 'Creating', 'Unavailable', 'Running', 'Deleting', 'Deleted', 'Stopping', 'Stopped', 'Starting', 'Updating' :vartype state: str or ~azure.mgmt.kusto.models.State - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState :ivar uri: The cluster URI. :vartype uri: str @@ -772,7 +792,7 @@ class ClusterUpdate(Resource): :param optimized_autoscale: Optimized auto scale definition. :type optimized_autoscale: ~azure.mgmt.kusto.models.OptimizedAutoscale :param enable_disk_encryption: A boolean value that indicates if the - cluster's disks are encrypted. + cluster's disks are encrypted. Default value: False . :type enable_disk_encryption: bool :param enable_streaming_ingest: A boolean value that indicates if the streaming ingest is enabled. Default value: False . @@ -792,7 +812,8 @@ class ClusterUpdate(Resource): :param enable_double_encryption: A boolean value that indicates if double encryption is enabled. Default value: False . :type enable_double_encryption: bool - :param engine_type: The engine type. Possible values include: 'V2', 'V3' + :param engine_type: The engine type. Possible values include: 'V2', 'V3'. + Default value: "V3" . :type engine_type: str or ~azure.mgmt.kusto.models.EngineType """ @@ -801,7 +822,6 @@ class ClusterUpdate(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'state': {'readonly': True}, - 'provisioning_state': {'readonly': True}, 'uri': {'readonly': True}, 'data_ingestion_uri': {'readonly': True}, 'state_reason': {'readonly': True}, @@ -840,20 +860,20 @@ def __init__(self, **kwargs): self.sku = kwargs.get('sku', None) self.identity = kwargs.get('identity', None) self.state = None - self.provisioning_state = None + self.provisioning_state = kwargs.get('provisioning_state', None) self.uri = None self.data_ingestion_uri = None self.state_reason = None self.trusted_external_tenants = kwargs.get('trusted_external_tenants', None) self.optimized_autoscale = kwargs.get('optimized_autoscale', None) - self.enable_disk_encryption = kwargs.get('enable_disk_encryption', None) + self.enable_disk_encryption = kwargs.get('enable_disk_encryption', False) self.enable_streaming_ingest = kwargs.get('enable_streaming_ingest', False) self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) self.key_vault_properties = kwargs.get('key_vault_properties', None) self.enable_purge = kwargs.get('enable_purge', False) self.language_extensions = None self.enable_double_encryption = kwargs.get('enable_double_encryption', False) - self.engine_type = kwargs.get('engine_type', None) + self.engine_type = kwargs.get('engine_type', "V3") class Database(ProxyResource): @@ -867,13 +887,13 @@ class Database(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param location: Resource location. :type location: str @@ -916,7 +936,7 @@ class DatabasePrincipal(Model): All required parameters must be populated in order to send to Azure. :param role: Required. Database principal role. Possible values include: - 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers', 'Viewer' + 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewer', 'Viewer' :type role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole :param name: Required. Database principal name. :type name: str @@ -970,19 +990,19 @@ class DatabasePrincipalAssignment(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param principal_id: Required. The principal ID assigned to the database principal. It can be a user email, application ID, or security group name. :type principal_id: str :param role: Required. Database principal role. Possible values include: - 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers', 'Viewer' + 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewer', 'Viewer' :type role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole :param tenant_id: The tenant id of the principal :type tenant_id: str @@ -993,10 +1013,10 @@ class DatabasePrincipalAssignment(ProxyResource): :vartype tenant_name: str :ivar principal_name: The principal name :vartype principal_name: str - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState """ @@ -1009,7 +1029,6 @@ class DatabasePrincipalAssignment(ProxyResource): 'principal_type': {'required': True}, 'tenant_name': {'readonly': True}, 'principal_name': {'readonly': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { @@ -1033,7 +1052,7 @@ def __init__(self, **kwargs): self.principal_type = kwargs.get('principal_type', None) self.tenant_name = None self.principal_name = None - self.provisioning_state = None + self.provisioning_state = kwargs.get('provisioning_state', None) class DatabasePrincipalAssignmentCheckNameRequest(Model): @@ -1130,13 +1149,13 @@ class DataConnection(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param location: Resource location. :type location: str @@ -1280,13 +1299,13 @@ class EventGridDataConnection(DataConnection): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param location: Resource location. :type location: str @@ -1319,10 +1338,10 @@ class EventGridDataConnection(DataConnection): 'Microsoft.Storage.BlobRenamed' :type blob_storage_event_type: str or ~azure.mgmt.kusto.models.BlobStorageEventType - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState """ @@ -1334,7 +1353,6 @@ class EventGridDataConnection(DataConnection): 'storage_account_resource_id': {'required': True}, 'event_hub_resource_id': {'required': True}, 'consumer_group': {'required': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { @@ -1364,7 +1382,7 @@ def __init__(self, **kwargs): self.data_format = kwargs.get('data_format', None) self.ignore_first_record = kwargs.get('ignore_first_record', None) self.blob_storage_event_type = kwargs.get('blob_storage_event_type', None) - self.provisioning_state = None + self.provisioning_state = kwargs.get('provisioning_state', None) self.kind = 'EventGrid' @@ -1376,13 +1394,13 @@ class EventHubDataConnection(DataConnection): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param location: Resource location. :type location: str @@ -1407,13 +1425,16 @@ class EventHubDataConnection(DataConnection): :param event_system_properties: System properties of the event hub :type event_system_properties: list[str] :param compression: The event hub messages compression type. Possible - values include: 'None', 'GZip' + values include: 'None', 'GZip'. Default value: "None" . :type compression: str or ~azure.mgmt.kusto.models.Compression - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + :param managed_identity_resource_id: The resource ID of a managed identity + (system or user assigned) to be used to authenticate with event hub. + :type managed_identity_resource_id: str """ _validation = { @@ -1423,7 +1444,6 @@ class EventHubDataConnection(DataConnection): 'kind': {'required': True}, 'event_hub_resource_id': {'required': True}, 'consumer_group': {'required': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { @@ -1440,6 +1460,7 @@ class EventHubDataConnection(DataConnection): 'event_system_properties': {'key': 'properties.eventSystemProperties', 'type': '[str]'}, 'compression': {'key': 'properties.compression', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'managed_identity_resource_id': {'key': 'properties.managedIdentityResourceId', 'type': 'str'}, } def __init__(self, **kwargs): @@ -1450,8 +1471,9 @@ def __init__(self, **kwargs): self.mapping_rule_name = kwargs.get('mapping_rule_name', None) self.data_format = kwargs.get('data_format', None) self.event_system_properties = kwargs.get('event_system_properties', None) - self.compression = kwargs.get('compression', None) - self.provisioning_state = None + self.compression = kwargs.get('compression', "None") + self.provisioning_state = kwargs.get('provisioning_state', None) + self.managed_identity_resource_id = kwargs.get('managed_identity_resource_id', None) self.kind = 'EventHub' @@ -1576,13 +1598,13 @@ class IotHubDataConnection(DataConnection): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param location: Resource location. :type location: str @@ -1609,10 +1631,10 @@ class IotHubDataConnection(DataConnection): :param shared_access_policy_name: Required. The name of the share access policy :type shared_access_policy_name: str - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState """ @@ -1624,7 +1646,6 @@ class IotHubDataConnection(DataConnection): 'iot_hub_resource_id': {'required': True}, 'consumer_group': {'required': True}, 'shared_access_policy_name': {'required': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { @@ -1652,7 +1673,7 @@ def __init__(self, **kwargs): self.data_format = kwargs.get('data_format', None) self.event_system_properties = kwargs.get('event_system_properties', None) self.shared_access_policy_name = kwargs.get('shared_access_policy_name', None) - self.provisioning_state = None + self.provisioning_state = kwargs.get('provisioning_state', None) self.kind = 'IotHub' @@ -1783,6 +1804,68 @@ def __init__(self, **kwargs): self.description = kwargs.get('description', None) +class OperationResult(Model): + """Operation Result Entity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: ID of the resource. + :vartype id: str + :ivar name: Name of the resource. + :vartype name: str + :param status: status of the Operation result. Possible values include: + 'Succeeded', 'Canceled', 'Failed', 'Running' + :type status: str or ~azure.mgmt.kusto.models.Status + :param start_time: The operation start time + :type start_time: datetime + :param end_time: The operation end time + :type end_time: datetime + :param percent_complete: Percentage completed. + :type percent_complete: float + :param operation_kind: The kind of the operation. + :type operation_kind: str + :param operation_state: The state of the operation. + :type operation_state: str + :param code: The code of the error. + :type code: str + :param message: The error message. + :type message: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'percent_complete': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'float'}, + 'operation_kind': {'key': 'properties.operationKind', 'type': 'str'}, + 'operation_state': {'key': 'properties.operationState', 'type': 'str'}, + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationResult, self).__init__(**kwargs) + self.id = None + self.name = None + self.status = kwargs.get('status', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.percent_complete = kwargs.get('percent_complete', None) + self.operation_kind = kwargs.get('operation_kind', None) + self.operation_state = kwargs.get('operation_state', None) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + class OptimizedAutoscale(Model): """A class that contains the optimized auto scale definition. @@ -1830,22 +1913,22 @@ class ReadOnlyFollowingDatabase(Database): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param location: Resource location. :type location: str :param kind: Required. Constant filled by server. :type kind: str - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type 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. @@ -1871,7 +1954,6 @@ class ReadOnlyFollowingDatabase(Database): 'name': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, - 'provisioning_state': {'readonly': True}, 'soft_delete_period': {'readonly': True}, 'leader_cluster_resource_id': {'readonly': True}, 'attached_database_configuration_name': {'readonly': True}, @@ -1895,7 +1977,7 @@ class ReadOnlyFollowingDatabase(Database): def __init__(self, **kwargs): super(ReadOnlyFollowingDatabase, self).__init__(**kwargs) - self.provisioning_state = None + self.provisioning_state = kwargs.get('provisioning_state', None) self.soft_delete_period = None self.hot_cache_period = kwargs.get('hot_cache_period', None) self.statistics = kwargs.get('statistics', None) @@ -1913,22 +1995,22 @@ class ReadWriteDatabase(Database): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param location: Resource location. :type location: str :param kind: Required. Constant filled by server. :type kind: str - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type 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. @@ -1947,7 +2029,6 @@ class ReadWriteDatabase(Database): 'name': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, - 'provisioning_state': {'readonly': True}, 'is_followed': {'readonly': True}, } @@ -1966,7 +2047,7 @@ class ReadWriteDatabase(Database): def __init__(self, **kwargs): super(ReadWriteDatabase, self).__init__(**kwargs) - self.provisioning_state = None + self.provisioning_state = kwargs.get('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) @@ -1974,6 +2055,105 @@ def __init__(self, **kwargs): self.kind = 'ReadWrite' +class Script(ProxyResource): + """Class representing a database script. + + 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. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param script_url: Required. The url to the KQL script blob file. + :type script_url: str + :param script_url_sas_token: Required. The SaS token. + :type script_url_sas_token: str + :param force_update_tag: A unique string. If changed the script will be + applied again. + :type force_update_tag: str + :param continue_on_errors: Flag that indicates whether to continue if one + of the command fails. Default value: False . + :type continue_on_errors: bool + :param provisioning_state: The provisioned state of the resource. Possible + values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Moving' + :type provisioning_state: str or + ~azure.mgmt.kusto.models.ProvisioningState + :ivar system_data: + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'script_url': {'required': True}, + 'script_url_sas_token': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'script_url': {'key': 'properties.scriptUrl', 'type': 'str'}, + 'script_url_sas_token': {'key': 'properties.scriptUrlSasToken', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'continue_on_errors': {'key': 'properties.continueOnErrors', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, **kwargs): + super(Script, self).__init__(**kwargs) + self.script_url = kwargs.get('script_url', None) + self.script_url_sas_token = kwargs.get('script_url_sas_token', None) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.continue_on_errors = kwargs.get('continue_on_errors', False) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.system_data = None + + +class ScriptCheckNameRequest(Model): + """A script 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. Script name. + :type name: str + :ivar type: Required. The type of resource, + Microsoft.Kusto/clusters/databases/scripts. Default value: + "Microsoft.Kusto/clusters/databases/scripts" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Kusto/clusters/databases/scripts" + + def __init__(self, **kwargs): + super(ScriptCheckNameRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + class SkuDescription(Model): """The Kusto SKU description of given resource type. @@ -2048,6 +2228,87 @@ def __init__(self, **kwargs): self.zones = kwargs.get('zones', None) +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or ~azure.mgmt.kusto.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or ~azure.mgmt.kusto.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC) + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + +class TableLevelSharingProperties(Model): + """Tables that will be included and excluded in the follower database. + + :param tables_to_include: List of tables to include in the follower + database + :type tables_to_include: list[str] + :param tables_to_exclude: List of tables to exclude from the follower + database + :type tables_to_exclude: list[str] + :param external_tables_to_include: List of external tables to include in + the follower database + :type external_tables_to_include: list[str] + :param external_tables_to_exclude: List of external tables exclude from + the follower database + :type external_tables_to_exclude: list[str] + :param materialized_views_to_include: List of materialized views to + include in the follower database + :type materialized_views_to_include: list[str] + :param materialized_views_to_exclude: List of materialized views exclude + from the follower database + :type materialized_views_to_exclude: list[str] + """ + + _attribute_map = { + 'tables_to_include': {'key': 'tablesToInclude', 'type': '[str]'}, + 'tables_to_exclude': {'key': 'tablesToExclude', 'type': '[str]'}, + 'external_tables_to_include': {'key': 'externalTablesToInclude', 'type': '[str]'}, + 'external_tables_to_exclude': {'key': 'externalTablesToExclude', 'type': '[str]'}, + 'materialized_views_to_include': {'key': 'materializedViewsToInclude', 'type': '[str]'}, + 'materialized_views_to_exclude': {'key': 'materializedViewsToExclude', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(TableLevelSharingProperties, self).__init__(**kwargs) + self.tables_to_include = kwargs.get('tables_to_include', None) + self.tables_to_exclude = kwargs.get('tables_to_exclude', None) + self.external_tables_to_include = kwargs.get('external_tables_to_include', None) + self.external_tables_to_exclude = kwargs.get('external_tables_to_exclude', None) + self.materialized_views_to_include = kwargs.get('materialized_views_to_include', None) + self.materialized_views_to_exclude = kwargs.get('materialized_views_to_exclude', None) + + class TrustedExternalTenant(Model): """Represents a tenant ID that is trusted by the cluster. diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models_py3.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models_py3.py index 5a74ad658569..225b15538827 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models_py3.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models_py3.py @@ -16,16 +16,19 @@ class Resource(Model): """Resource. + Common fields that are returned in the response for all Azure Resource + Manager resources. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -49,19 +52,21 @@ def __init__(self, **kwargs) -> None: class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -89,20 +94,20 @@ class AttachedDatabaseConfiguration(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param location: Resource location. :type location: str - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState :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 @@ -119,13 +124,15 @@ class AttachedDatabaseConfiguration(ProxyResource): 'None' :type default_principals_modification_kind: str or ~azure.mgmt.kusto.models.DefaultPrincipalsModificationKind + :param table_level_sharing_properties: Table level sharing specifications + :type table_level_sharing_properties: + ~azure.mgmt.kusto.models.TableLevelSharingProperties """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, 'database_name': {'required': True}, 'cluster_resource_id': {'required': True}, 'attached_database_names': {'readonly': True}, @@ -142,16 +149,18 @@ class AttachedDatabaseConfiguration(ProxyResource): 'cluster_resource_id': {'key': 'properties.clusterResourceId', 'type': 'str'}, 'attached_database_names': {'key': 'properties.attachedDatabaseNames', 'type': '[str]'}, 'default_principals_modification_kind': {'key': 'properties.defaultPrincipalsModificationKind', 'type': 'str'}, + 'table_level_sharing_properties': {'key': 'properties.tableLevelSharingProperties', 'type': 'TableLevelSharingProperties'}, } - def __init__(self, *, database_name: str, cluster_resource_id: str, default_principals_modification_kind, location: str=None, **kwargs) -> None: + def __init__(self, *, database_name: str, cluster_resource_id: str, default_principals_modification_kind, location: str=None, provisioning_state=None, table_level_sharing_properties=None, **kwargs) -> None: super(AttachedDatabaseConfiguration, self).__init__(**kwargs) self.location = location - self.provisioning_state = None + self.provisioning_state = provisioning_state self.database_name = database_name self.cluster_resource_id = cluster_resource_id self.attached_database_names = None self.default_principals_modification_kind = default_principals_modification_kind + self.table_level_sharing_properties = table_level_sharing_properties class AzureCapacity(Model): @@ -193,19 +202,21 @@ def __init__(self, *, scale_type, minimum: int, maximum: int, default: int, **kw class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. + """Entity Resource. + + The resource model definition for an Azure Resource Manager resource with + an etag. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar etag: Resource Etag. :vartype etag: str @@ -262,12 +273,13 @@ class AzureSku(Model): :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', - 'Standard_E64i_v3', 'Standard_E2a_v4', 'Standard_E4a_v4', - 'Standard_E8a_v4', 'Standard_E16a_v4', 'Standard_E8as_v4+1TB_PS', - 'Standard_E8as_v4+2TB_PS', 'Standard_E16as_v4+3TB_PS', - 'Standard_E16as_v4+4TB_PS', 'Dev(No SLA)_Standard_E2a_v4' + 'Standard_D14_v2', 'Standard_L8s', 'Standard_L16s', 'Standard_L8s_v2', + 'Standard_L16s_v2', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_L4s', + 'Dev(No SLA)_Standard_D11_v2', 'Standard_E64i_v3', 'Standard_E80ids_v4', + 'Standard_E2a_v4', 'Standard_E4a_v4', 'Standard_E8a_v4', + 'Standard_E16a_v4', 'Standard_E8as_v4+1TB_PS', 'Standard_E8as_v4+2TB_PS', + 'Standard_E16as_v4+3TB_PS', 'Standard_E16as_v4+4TB_PS', 'Dev(No + SLA)_Standard_E2a_v4' :type name: str or ~azure.mgmt.kusto.models.AzureSkuName :param capacity: The number of instances of the cluster. :type capacity: int @@ -415,20 +427,23 @@ def __init__(self, *, code: str=None, message: str=None, target: str=None, detai class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """Tracked Resource. + + The resource model definition for an Azure Resource Manager tracked top + level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -465,13 +480,13 @@ class Cluster(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -487,10 +502,10 @@ class Cluster(TrackedResource): 'Creating', 'Unavailable', 'Running', 'Deleting', 'Deleted', 'Stopping', 'Stopped', 'Starting', 'Updating' :vartype state: str or ~azure.mgmt.kusto.models.State - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState :ivar uri: The cluster URI. :vartype uri: str @@ -504,7 +519,7 @@ class Cluster(TrackedResource): :param optimized_autoscale: Optimized auto scale definition. :type optimized_autoscale: ~azure.mgmt.kusto.models.OptimizedAutoscale :param enable_disk_encryption: A boolean value that indicates if the - cluster's disks are encrypted. + cluster's disks are encrypted. Default value: False . :type enable_disk_encryption: bool :param enable_streaming_ingest: A boolean value that indicates if the streaming ingest is enabled. Default value: False . @@ -524,8 +539,12 @@ class Cluster(TrackedResource): :param enable_double_encryption: A boolean value that indicates if double encryption is enabled. Default value: False . :type enable_double_encryption: bool - :param engine_type: The engine type. Possible values include: 'V2', 'V3' + :param engine_type: The engine type. Possible values include: 'V2', 'V3'. + Default value: "V3" . :type engine_type: str or ~azure.mgmt.kusto.models.EngineType + :ivar etag: A unique read-only string that changes whenever the resource + is updated. + :vartype etag: str """ _validation = { @@ -535,11 +554,11 @@ class Cluster(TrackedResource): 'location': {'required': True}, 'sku': {'required': True}, 'state': {'readonly': True}, - 'provisioning_state': {'readonly': True}, 'uri': {'readonly': True}, 'data_ingestion_uri': {'readonly': True}, 'state_reason': {'readonly': True}, 'language_extensions': {'readonly': True}, + 'etag': {'readonly': True}, } _attribute_map = { @@ -566,15 +585,16 @@ class Cluster(TrackedResource): 'language_extensions': {'key': 'properties.languageExtensions', 'type': 'LanguageExtensionsList'}, 'enable_double_encryption': {'key': 'properties.enableDoubleEncryption', 'type': 'bool'}, 'engine_type': {'key': 'properties.engineType', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, *, location: str, sku, tags=None, zones=None, identity=None, trusted_external_tenants=None, optimized_autoscale=None, enable_disk_encryption: bool=None, enable_streaming_ingest: bool=False, virtual_network_configuration=None, key_vault_properties=None, enable_purge: bool=False, enable_double_encryption: bool=False, engine_type=None, **kwargs) -> None: + def __init__(self, *, location: str, sku, tags=None, zones=None, identity=None, provisioning_state=None, trusted_external_tenants=None, optimized_autoscale=None, enable_disk_encryption: bool=False, enable_streaming_ingest: bool=False, virtual_network_configuration=None, key_vault_properties=None, enable_purge: bool=False, enable_double_encryption: bool=False, engine_type="V3", **kwargs) -> None: super(Cluster, self).__init__(tags=tags, location=location, **kwargs) self.sku = sku self.zones = zones self.identity = identity self.state = None - self.provisioning_state = None + self.provisioning_state = provisioning_state self.uri = None self.data_ingestion_uri = None self.state_reason = None @@ -588,6 +608,7 @@ def __init__(self, *, location: str, sku, tags=None, zones=None, identity=None, self.language_extensions = None self.enable_double_encryption = enable_double_encryption self.engine_type = engine_type + self.etag = None class ClusterCheckNameRequest(Model): @@ -630,13 +651,13 @@ class ClusterPrincipalAssignment(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param principal_id: Required. The principal ID assigned to the cluster principal. It can be a user email, application ID, or security group name. @@ -653,10 +674,10 @@ class ClusterPrincipalAssignment(ProxyResource): :vartype tenant_name: str :ivar principal_name: The principal name :vartype principal_name: str - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState """ @@ -669,7 +690,6 @@ class ClusterPrincipalAssignment(ProxyResource): 'principal_type': {'required': True}, 'tenant_name': {'readonly': True}, 'principal_name': {'readonly': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { @@ -685,7 +705,7 @@ class ClusterPrincipalAssignment(ProxyResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, principal_id: str, role, principal_type, tenant_id: str=None, **kwargs) -> None: + def __init__(self, *, principal_id: str, role, principal_type, tenant_id: str=None, provisioning_state=None, **kwargs) -> None: super(ClusterPrincipalAssignment, self).__init__(**kwargs) self.principal_id = principal_id self.role = role @@ -693,7 +713,7 @@ def __init__(self, *, principal_id: str, role, principal_type, tenant_id: str=No self.principal_type = principal_type self.tenant_name = None self.principal_name = None - self.provisioning_state = None + self.provisioning_state = provisioning_state class ClusterPrincipalAssignmentCheckNameRequest(Model): @@ -735,13 +755,13 @@ class ClusterUpdate(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -755,10 +775,10 @@ class ClusterUpdate(Resource): 'Creating', 'Unavailable', 'Running', 'Deleting', 'Deleted', 'Stopping', 'Stopped', 'Starting', 'Updating' :vartype state: str or ~azure.mgmt.kusto.models.State - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState :ivar uri: The cluster URI. :vartype uri: str @@ -772,7 +792,7 @@ class ClusterUpdate(Resource): :param optimized_autoscale: Optimized auto scale definition. :type optimized_autoscale: ~azure.mgmt.kusto.models.OptimizedAutoscale :param enable_disk_encryption: A boolean value that indicates if the - cluster's disks are encrypted. + cluster's disks are encrypted. Default value: False . :type enable_disk_encryption: bool :param enable_streaming_ingest: A boolean value that indicates if the streaming ingest is enabled. Default value: False . @@ -792,7 +812,8 @@ class ClusterUpdate(Resource): :param enable_double_encryption: A boolean value that indicates if double encryption is enabled. Default value: False . :type enable_double_encryption: bool - :param engine_type: The engine type. Possible values include: 'V2', 'V3' + :param engine_type: The engine type. Possible values include: 'V2', 'V3'. + Default value: "V3" . :type engine_type: str or ~azure.mgmt.kusto.models.EngineType """ @@ -801,7 +822,6 @@ class ClusterUpdate(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'state': {'readonly': True}, - 'provisioning_state': {'readonly': True}, 'uri': {'readonly': True}, 'data_ingestion_uri': {'readonly': True}, 'state_reason': {'readonly': True}, @@ -833,14 +853,14 @@ class ClusterUpdate(Resource): 'engine_type': {'key': 'properties.engineType', 'type': 'str'}, } - def __init__(self, *, tags=None, location: str=None, sku=None, identity=None, trusted_external_tenants=None, optimized_autoscale=None, enable_disk_encryption: bool=None, enable_streaming_ingest: bool=False, virtual_network_configuration=None, key_vault_properties=None, enable_purge: bool=False, enable_double_encryption: bool=False, engine_type=None, **kwargs) -> None: + def __init__(self, *, tags=None, location: str=None, sku=None, identity=None, provisioning_state=None, trusted_external_tenants=None, optimized_autoscale=None, enable_disk_encryption: bool=False, enable_streaming_ingest: bool=False, virtual_network_configuration=None, key_vault_properties=None, enable_purge: bool=False, enable_double_encryption: bool=False, engine_type="V3", **kwargs) -> None: super(ClusterUpdate, self).__init__(**kwargs) self.tags = tags self.location = location self.sku = sku self.identity = identity self.state = None - self.provisioning_state = None + self.provisioning_state = provisioning_state self.uri = None self.data_ingestion_uri = None self.state_reason = None @@ -867,13 +887,13 @@ class Database(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param location: Resource location. :type location: str @@ -916,7 +936,7 @@ class DatabasePrincipal(Model): All required parameters must be populated in order to send to Azure. :param role: Required. Database principal role. Possible values include: - 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers', 'Viewer' + 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewer', 'Viewer' :type role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole :param name: Required. Database principal name. :type name: str @@ -970,19 +990,19 @@ class DatabasePrincipalAssignment(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param principal_id: Required. The principal ID assigned to the database principal. It can be a user email, application ID, or security group name. :type principal_id: str :param role: Required. Database principal role. Possible values include: - 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers', 'Viewer' + 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewer', 'Viewer' :type role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole :param tenant_id: The tenant id of the principal :type tenant_id: str @@ -993,10 +1013,10 @@ class DatabasePrincipalAssignment(ProxyResource): :vartype tenant_name: str :ivar principal_name: The principal name :vartype principal_name: str - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState """ @@ -1009,7 +1029,6 @@ class DatabasePrincipalAssignment(ProxyResource): 'principal_type': {'required': True}, 'tenant_name': {'readonly': True}, 'principal_name': {'readonly': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { @@ -1025,7 +1044,7 @@ class DatabasePrincipalAssignment(ProxyResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, principal_id: str, role, principal_type, tenant_id: str=None, **kwargs) -> None: + def __init__(self, *, principal_id: str, role, principal_type, tenant_id: str=None, provisioning_state=None, **kwargs) -> None: super(DatabasePrincipalAssignment, self).__init__(**kwargs) self.principal_id = principal_id self.role = role @@ -1033,7 +1052,7 @@ def __init__(self, *, principal_id: str, role, principal_type, tenant_id: str=No self.principal_type = principal_type self.tenant_name = None self.principal_name = None - self.provisioning_state = None + self.provisioning_state = provisioning_state class DatabasePrincipalAssignmentCheckNameRequest(Model): @@ -1130,13 +1149,13 @@ class DataConnection(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param location: Resource location. :type location: str @@ -1280,13 +1299,13 @@ class EventGridDataConnection(DataConnection): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param location: Resource location. :type location: str @@ -1319,10 +1338,10 @@ class EventGridDataConnection(DataConnection): 'Microsoft.Storage.BlobRenamed' :type blob_storage_event_type: str or ~azure.mgmt.kusto.models.BlobStorageEventType - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState """ @@ -1334,7 +1353,6 @@ class EventGridDataConnection(DataConnection): 'storage_account_resource_id': {'required': True}, 'event_hub_resource_id': {'required': True}, 'consumer_group': {'required': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { @@ -1354,7 +1372,7 @@ class EventGridDataConnection(DataConnection): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, storage_account_resource_id: str, event_hub_resource_id: str, consumer_group: str, location: str=None, table_name: str=None, mapping_rule_name: str=None, data_format=None, ignore_first_record: bool=None, blob_storage_event_type=None, **kwargs) -> None: + def __init__(self, *, storage_account_resource_id: str, event_hub_resource_id: str, consumer_group: str, location: str=None, table_name: str=None, mapping_rule_name: str=None, data_format=None, ignore_first_record: bool=None, blob_storage_event_type=None, provisioning_state=None, **kwargs) -> None: super(EventGridDataConnection, self).__init__(location=location, **kwargs) self.storage_account_resource_id = storage_account_resource_id self.event_hub_resource_id = event_hub_resource_id @@ -1364,7 +1382,7 @@ def __init__(self, *, storage_account_resource_id: str, event_hub_resource_id: s self.data_format = data_format self.ignore_first_record = ignore_first_record self.blob_storage_event_type = blob_storage_event_type - self.provisioning_state = None + self.provisioning_state = provisioning_state self.kind = 'EventGrid' @@ -1376,13 +1394,13 @@ class EventHubDataConnection(DataConnection): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param location: Resource location. :type location: str @@ -1407,13 +1425,16 @@ class EventHubDataConnection(DataConnection): :param event_system_properties: System properties of the event hub :type event_system_properties: list[str] :param compression: The event hub messages compression type. Possible - values include: 'None', 'GZip' + values include: 'None', 'GZip'. Default value: "None" . :type compression: str or ~azure.mgmt.kusto.models.Compression - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + :param managed_identity_resource_id: The resource ID of a managed identity + (system or user assigned) to be used to authenticate with event hub. + :type managed_identity_resource_id: str """ _validation = { @@ -1423,7 +1444,6 @@ class EventHubDataConnection(DataConnection): 'kind': {'required': True}, 'event_hub_resource_id': {'required': True}, 'consumer_group': {'required': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { @@ -1440,9 +1460,10 @@ class EventHubDataConnection(DataConnection): 'event_system_properties': {'key': 'properties.eventSystemProperties', 'type': '[str]'}, 'compression': {'key': 'properties.compression', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'managed_identity_resource_id': {'key': 'properties.managedIdentityResourceId', 'type': 'str'}, } - def __init__(self, *, event_hub_resource_id: str, consumer_group: str, location: str=None, table_name: str=None, mapping_rule_name: str=None, data_format=None, event_system_properties=None, compression=None, **kwargs) -> None: + def __init__(self, *, event_hub_resource_id: str, consumer_group: str, location: str=None, table_name: str=None, mapping_rule_name: str=None, data_format=None, event_system_properties=None, compression="None", provisioning_state=None, managed_identity_resource_id: str=None, **kwargs) -> None: super(EventHubDataConnection, self).__init__(location=location, **kwargs) self.event_hub_resource_id = event_hub_resource_id self.consumer_group = consumer_group @@ -1451,7 +1472,8 @@ def __init__(self, *, event_hub_resource_id: str, consumer_group: str, location: self.data_format = data_format self.event_system_properties = event_system_properties self.compression = compression - self.provisioning_state = None + self.provisioning_state = provisioning_state + self.managed_identity_resource_id = managed_identity_resource_id self.kind = 'EventHub' @@ -1576,13 +1598,13 @@ class IotHubDataConnection(DataConnection): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param location: Resource location. :type location: str @@ -1609,10 +1631,10 @@ class IotHubDataConnection(DataConnection): :param shared_access_policy_name: Required. The name of the share access policy :type shared_access_policy_name: str - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState """ @@ -1624,7 +1646,6 @@ class IotHubDataConnection(DataConnection): 'iot_hub_resource_id': {'required': True}, 'consumer_group': {'required': True}, 'shared_access_policy_name': {'required': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { @@ -1643,7 +1664,7 @@ class IotHubDataConnection(DataConnection): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, iot_hub_resource_id: str, consumer_group: str, shared_access_policy_name: str, location: str=None, table_name: str=None, mapping_rule_name: str=None, data_format=None, event_system_properties=None, **kwargs) -> None: + def __init__(self, *, iot_hub_resource_id: str, consumer_group: str, shared_access_policy_name: str, location: str=None, table_name: str=None, mapping_rule_name: str=None, data_format=None, event_system_properties=None, provisioning_state=None, **kwargs) -> None: super(IotHubDataConnection, self).__init__(location=location, **kwargs) self.iot_hub_resource_id = iot_hub_resource_id self.consumer_group = consumer_group @@ -1652,7 +1673,7 @@ def __init__(self, *, iot_hub_resource_id: str, consumer_group: str, shared_acce self.data_format = data_format self.event_system_properties = event_system_properties self.shared_access_policy_name = shared_access_policy_name - self.provisioning_state = None + self.provisioning_state = provisioning_state self.kind = 'IotHub' @@ -1783,6 +1804,68 @@ def __init__(self, *, provider: str=None, operation: str=None, resource: str=Non self.description = description +class OperationResult(Model): + """Operation Result Entity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: ID of the resource. + :vartype id: str + :ivar name: Name of the resource. + :vartype name: str + :param status: status of the Operation result. Possible values include: + 'Succeeded', 'Canceled', 'Failed', 'Running' + :type status: str or ~azure.mgmt.kusto.models.Status + :param start_time: The operation start time + :type start_time: datetime + :param end_time: The operation end time + :type end_time: datetime + :param percent_complete: Percentage completed. + :type percent_complete: float + :param operation_kind: The kind of the operation. + :type operation_kind: str + :param operation_state: The state of the operation. + :type operation_state: str + :param code: The code of the error. + :type code: str + :param message: The error message. + :type message: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'percent_complete': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'float'}, + 'operation_kind': {'key': 'properties.operationKind', 'type': 'str'}, + 'operation_state': {'key': 'properties.operationState', 'type': 'str'}, + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + } + + def __init__(self, *, status=None, start_time=None, end_time=None, percent_complete: float=None, operation_kind: str=None, operation_state: str=None, code: str=None, message: str=None, **kwargs) -> None: + super(OperationResult, self).__init__(**kwargs) + self.id = None + self.name = None + self.status = status + self.start_time = start_time + self.end_time = end_time + self.percent_complete = percent_complete + self.operation_kind = operation_kind + self.operation_state = operation_state + self.code = code + self.message = message + + class OptimizedAutoscale(Model): """A class that contains the optimized auto scale definition. @@ -1830,22 +1913,22 @@ class ReadOnlyFollowingDatabase(Database): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param location: Resource location. :type location: str :param kind: Required. Constant filled by server. :type kind: str - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type 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. @@ -1871,7 +1954,6 @@ class ReadOnlyFollowingDatabase(Database): 'name': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, - 'provisioning_state': {'readonly': True}, 'soft_delete_period': {'readonly': True}, 'leader_cluster_resource_id': {'readonly': True}, 'attached_database_configuration_name': {'readonly': True}, @@ -1893,9 +1975,9 @@ class ReadOnlyFollowingDatabase(Database): 'principals_modification_kind': {'key': 'properties.principalsModificationKind', 'type': 'str'}, } - def __init__(self, *, location: str=None, hot_cache_period=None, statistics=None, **kwargs) -> None: + def __init__(self, *, location: str=None, provisioning_state=None, hot_cache_period=None, statistics=None, **kwargs) -> None: super(ReadOnlyFollowingDatabase, self).__init__(location=location, **kwargs) - self.provisioning_state = None + self.provisioning_state = provisioning_state self.soft_delete_period = None self.hot_cache_period = hot_cache_period self.statistics = statistics @@ -1913,22 +1995,22 @@ class ReadWriteDatabase(Database): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param location: Resource location. :type location: str :param kind: Required. Constant filled by server. :type kind: str - :ivar provisioning_state: The provisioned state of the resource. Possible + :param provisioning_state: The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' - :vartype provisioning_state: str or + :type 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. @@ -1947,7 +2029,6 @@ class ReadWriteDatabase(Database): 'name': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, - 'provisioning_state': {'readonly': True}, 'is_followed': {'readonly': True}, } @@ -1964,9 +2045,9 @@ class ReadWriteDatabase(Database): 'is_followed': {'key': 'properties.isFollowed', 'type': 'bool'}, } - def __init__(self, *, location: str=None, soft_delete_period=None, hot_cache_period=None, statistics=None, **kwargs) -> None: + def __init__(self, *, location: str=None, provisioning_state=None, soft_delete_period=None, hot_cache_period=None, statistics=None, **kwargs) -> None: super(ReadWriteDatabase, self).__init__(location=location, **kwargs) - self.provisioning_state = None + self.provisioning_state = provisioning_state self.soft_delete_period = soft_delete_period self.hot_cache_period = hot_cache_period self.statistics = statistics @@ -1974,6 +2055,105 @@ def __init__(self, *, location: str=None, soft_delete_period=None, hot_cache_per self.kind = 'ReadWrite' +class Script(ProxyResource): + """Class representing a database script. + + 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. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param script_url: Required. The url to the KQL script blob file. + :type script_url: str + :param script_url_sas_token: Required. The SaS token. + :type script_url_sas_token: str + :param force_update_tag: A unique string. If changed the script will be + applied again. + :type force_update_tag: str + :param continue_on_errors: Flag that indicates whether to continue if one + of the command fails. Default value: False . + :type continue_on_errors: bool + :param provisioning_state: The provisioned state of the resource. Possible + values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Moving' + :type provisioning_state: str or + ~azure.mgmt.kusto.models.ProvisioningState + :ivar system_data: + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'script_url': {'required': True}, + 'script_url_sas_token': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'script_url': {'key': 'properties.scriptUrl', 'type': 'str'}, + 'script_url_sas_token': {'key': 'properties.scriptUrlSasToken', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'continue_on_errors': {'key': 'properties.continueOnErrors', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, *, script_url: str, script_url_sas_token: str, force_update_tag: str=None, continue_on_errors: bool=False, provisioning_state=None, **kwargs) -> None: + super(Script, self).__init__(**kwargs) + self.script_url = script_url + self.script_url_sas_token = script_url_sas_token + self.force_update_tag = force_update_tag + self.continue_on_errors = continue_on_errors + self.provisioning_state = provisioning_state + self.system_data = None + + +class ScriptCheckNameRequest(Model): + """A script 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. Script name. + :type name: str + :ivar type: Required. The type of resource, + Microsoft.Kusto/clusters/databases/scripts. Default value: + "Microsoft.Kusto/clusters/databases/scripts" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Kusto/clusters/databases/scripts" + + def __init__(self, *, name: str, **kwargs) -> None: + super(ScriptCheckNameRequest, self).__init__(**kwargs) + self.name = name + + class SkuDescription(Model): """The Kusto SKU description of given resource type. @@ -2048,6 +2228,87 @@ def __init__(self, *, location: str, zones=None, **kwargs) -> None: self.zones = zones +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or ~azure.mgmt.kusto.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or ~azure.mgmt.kusto.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC) + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class TableLevelSharingProperties(Model): + """Tables that will be included and excluded in the follower database. + + :param tables_to_include: List of tables to include in the follower + database + :type tables_to_include: list[str] + :param tables_to_exclude: List of tables to exclude from the follower + database + :type tables_to_exclude: list[str] + :param external_tables_to_include: List of external tables to include in + the follower database + :type external_tables_to_include: list[str] + :param external_tables_to_exclude: List of external tables exclude from + the follower database + :type external_tables_to_exclude: list[str] + :param materialized_views_to_include: List of materialized views to + include in the follower database + :type materialized_views_to_include: list[str] + :param materialized_views_to_exclude: List of materialized views exclude + from the follower database + :type materialized_views_to_exclude: list[str] + """ + + _attribute_map = { + 'tables_to_include': {'key': 'tablesToInclude', 'type': '[str]'}, + 'tables_to_exclude': {'key': 'tablesToExclude', 'type': '[str]'}, + 'external_tables_to_include': {'key': 'externalTablesToInclude', 'type': '[str]'}, + 'external_tables_to_exclude': {'key': 'externalTablesToExclude', 'type': '[str]'}, + 'materialized_views_to_include': {'key': 'materializedViewsToInclude', 'type': '[str]'}, + 'materialized_views_to_exclude': {'key': 'materializedViewsToExclude', 'type': '[str]'}, + } + + def __init__(self, *, tables_to_include=None, tables_to_exclude=None, external_tables_to_include=None, external_tables_to_exclude=None, materialized_views_to_include=None, materialized_views_to_exclude=None, **kwargs) -> None: + super(TableLevelSharingProperties, self).__init__(**kwargs) + self.tables_to_include = tables_to_include + self.tables_to_exclude = tables_to_exclude + self.external_tables_to_include = external_tables_to_include + self.external_tables_to_exclude = external_tables_to_exclude + self.materialized_views_to_include = materialized_views_to_include + self.materialized_views_to_exclude = materialized_views_to_exclude + + class TrustedExternalTenant(Model): """Represents a tenant ID that is trusted by the cluster. diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_paged_models.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_paged_models.py index ce8562c108fa..e84b08a07dc7 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_paged_models.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_paged_models.py @@ -129,6 +129,19 @@ class DatabasePrincipalAssignmentPaged(Paged): def __init__(self, *args, **kwargs): super(DatabasePrincipalAssignmentPaged, self).__init__(*args, **kwargs) +class ScriptPaged(Paged): + """ + A paging container for iterating over a list of :class:`Script ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Script]'} + } + + def __init__(self, *args, **kwargs): + + super(ScriptPaged, self).__init__(*args, **kwargs) class AttachedDatabaseConfigurationPaged(Paged): """ A paging container for iterating over a list of :class:`AttachedDatabaseConfiguration ` object diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py index fb3a90ec8393..e09f0f9a5425 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py @@ -13,16 +13,20 @@ from ._cluster_principal_assignments_operations import ClusterPrincipalAssignmentsOperations from ._databases_operations import DatabasesOperations from ._database_principal_assignments_operations import DatabasePrincipalAssignmentsOperations +from ._scripts_operations import ScriptsOperations from ._attached_database_configurations_operations import AttachedDatabaseConfigurationsOperations from ._data_connections_operations import DataConnectionsOperations from ._operations import Operations +from ._operations_results_operations import OperationsResultsOperations __all__ = [ 'ClustersOperations', 'ClusterPrincipalAssignmentsOperations', 'DatabasesOperations', 'DatabasePrincipalAssignmentsOperations', + 'ScriptsOperations', 'AttachedDatabaseConfigurationsOperations', 'DataConnectionsOperations', 'Operations', + 'OperationsResultsOperations', ] diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_attached_database_configurations_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_attached_database_configurations_operations.py index 4e681d721160..5bc132468e1e 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_attached_database_configurations_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_attached_database_configurations_operations.py @@ -27,7 +27,7 @@ class AttachedDatabaseConfigurationsOperations(object): :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: "2020-09-18". + :ivar api_version: Client API Version. Constant value: "2021-01-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-09-18" + self.api_version = "2021-01-01" self.config = config diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_cluster_principal_assignments_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_cluster_principal_assignments_operations.py index 23c3eb6dd336..84e99aa54b27 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_cluster_principal_assignments_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_cluster_principal_assignments_operations.py @@ -27,7 +27,7 @@ class ClusterPrincipalAssignmentsOperations(object): :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: "2020-09-18". + :ivar api_version: Client API Version. Constant value: "2021-01-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-09-18" + self.api_version = "2021-01-01" self.config = config diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_clusters_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_clusters_operations.py index 79eaccb242c8..bb2c09b45acb 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_clusters_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_clusters_operations.py @@ -27,7 +27,7 @@ class ClustersOperations(object): :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: "2020-09-18". + :ivar api_version: Client API Version. Constant value: "2021-01-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-09-18" + self.api_version = "2021-01-01" self.config = config @@ -105,7 +105,7 @@ def get( def _create_or_update_initial( - self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, cluster_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -127,6 +127,10 @@ def _create_or_update_initial( header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') @@ -156,7 +160,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, cluster_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, polling=True, **operation_config): """Create or update a Kusto cluster. :param resource_group_name: The name of the resource group containing @@ -167,6 +171,14 @@ def create_or_update( :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. :type parameters: ~azure.mgmt.kusto.models.Cluster + :param if_match: The ETag of the cluster. Omit this value to always + overwrite the current cluster. Specify the last-seen ETag value to + prevent accidentally overwriting concurrent changes. + :type if_match: str + :param if_none_match: Set to '*' to allow a new cluster to be created, + but to prevent updating an existing cluster. Other values will result + in a 412 Pre-condition Failed response. + :type if_none_match: 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 @@ -184,6 +196,8 @@ def create_or_update( resource_group_name=resource_group_name, cluster_name=cluster_name, parameters=parameters, + if_match=if_match, + if_none_match=if_none_match, custom_headers=custom_headers, raw=True, **operation_config @@ -209,7 +223,7 @@ def get_long_running_output(response): def _update_initial( - self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, cluster_name, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.update.metadata['url'] path_format_arguments = { @@ -231,6 +245,8 @@ def _update_initial( header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') @@ -262,7 +278,7 @@ def _update_initial( return deserialized def update( - self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, cluster_name, parameters, if_match=None, custom_headers=None, raw=False, polling=True, **operation_config): """Update a Kusto cluster. :param resource_group_name: The name of the resource group containing @@ -273,6 +289,10 @@ def update( :param parameters: The Kusto cluster parameters supplied to the Update operation. :type parameters: ~azure.mgmt.kusto.models.ClusterUpdate + :param if_match: The ETag of the cluster. Omit this value to always + overwrite the current cluster. Specify the last-seen ETag value to + prevent accidentally overwriting concurrent changes. + :type if_match: 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 @@ -290,6 +310,7 @@ def update( resource_group_name=resource_group_name, cluster_name=cluster_name, parameters=parameters, + if_match=if_match, custom_headers=custom_headers, raw=True, **operation_config @@ -1023,7 +1044,7 @@ def check_name_availability( self, location, name, custom_headers=None, raw=False, **operation_config): """Checks that the cluster name is valid and is not already in use. - :param location: Azure location. + :param location: Azure location (region) name. :type location: str :param name: Cluster name. :type name: str diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py index 3c20e0672115..02d3ad4b9a04 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py @@ -27,7 +27,7 @@ class DataConnectionsOperations(object): :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: "2020-09-18". + :ivar api_version: Client API Version. Constant value: "2021-01-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-09-18" + self.api_version = "2021-01-01" self.config = config diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_principal_assignments_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_principal_assignments_operations.py index 9d88a41d9c28..2fb0b350fbc9 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_principal_assignments_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_principal_assignments_operations.py @@ -27,7 +27,7 @@ class DatabasePrincipalAssignmentsOperations(object): :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: "2020-09-18". + :ivar api_version: Client API Version. Constant value: "2021-01-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-09-18" + self.api_version = "2021-01-01" self.config = config diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_databases_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_databases_operations.py index 539a4c1caebe..ce97f5d4af21 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_databases_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_databases_operations.py @@ -27,7 +27,7 @@ class DatabasesOperations(object): :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: "2020-09-18". + :ivar api_version: Client API Version. Constant value: "2021-01-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-09-18" + self.api_version = "2021-01-01" self.config = config diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations.py index d422481440f1..a64c17fd004f 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations.py @@ -25,7 +25,7 @@ class Operations(object): :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: "2020-09-18". + :ivar api_version: Client API Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-09-18" + self.api_version = "2021-01-01" self.config = config diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_operations.py new file mode 100644 index 000000000000..251fc1d1189b --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_operations.py @@ -0,0 +1,101 @@ +# 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 .. import models + + +class OperationsResultsOperations(object): + """OperationsResultsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :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: "2021-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-01-01" + + self.config = config + + def get( + self, location, operation_id, custom_headers=None, raw=False, **operation_config): + """Returns operation results. + + :param location: Azure location (region) name. + :type location: str + :param operation_id: The Guid of the operation ID + :type operation_id: 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: OperationResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.kusto.models.OperationResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'operationId': self._serialize.url("operation_id", operation_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('OperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/operationresults/{operationId}'} diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_scripts_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_scripts_operations.py new file mode 100644 index 000000000000..60fe540e849d --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_scripts_operations.py @@ -0,0 +1,573 @@ +# 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 ScriptsOperations(object): + """ScriptsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :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: "2021-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-01-01" + + self.config = config + + def list_by_database( + self, resource_group_name, cluster_name, database_name, custom_headers=None, raw=False, **operation_config): + """Returns the list of database scripts for given database. + + :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 database_name: The name of the database in the Kusto cluster. + :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 Script + :rtype: + ~azure.mgmt.kusto.models.ScriptPaged[~azure.mgmt.kusto.models.Script] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_database.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + header_dict = None + if raw: + header_dict = {} + deserialized = models.ScriptPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts'} + + def get( + self, resource_group_name, cluster_name, database_name, script_name, custom_headers=None, raw=False, **operation_config): + """Gets a Kusto cluster database script. + + :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 database_name: The name of the database in the Kusto cluster. + :type database_name: str + :param script_name: The name of the Kusto database script. + :type script_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: Script or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.kusto.models.Script or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'scriptName': self._serialize.url("script_name", script_name, '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('Script', 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}/databases/{databaseName}/scripts/{scriptName}'} + + + def _create_or_update_initial( + self, resource_group_name, cluster_name, database_name, script_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'scriptName': self._serialize.url("script_name", script_name, '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, 'Script') + + # 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('Script', response) + if response.status_code == 201: + deserialized = self._deserialize('Script', response) + if response.status_code == 202: + deserialized = self._deserialize('Script', 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, database_name, script_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a Kusto database script. + + :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 database_name: The name of the database in the Kusto cluster. + :type database_name: str + :param script_name: The name of the Kusto database script. + :type script_name: str + :param parameters: The Kusto Script parameters contains the KQL to + run. + :type parameters: ~azure.mgmt.kusto.models.Script + :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 Script or + ClientRawResponse