Skip to content

Commit

Permalink
CodeGen from PR 13306 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 161f23776642deeb8d2083b2845e2febbfcded6c into 86e3315
  • Loading branch information
SDKAuto committed Apr 11, 2021
1 parent f3760fc commit 3e4a0e2
Show file tree
Hide file tree
Showing 32 changed files with 2,628 additions and 309 deletions.
1 change: 1 addition & 0 deletions sdk/kusto/azure-mgmt-kusto/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/kusto/azure-mgmt-kusto/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "3.0.6369",
"use": "@autorest/[email protected]",
"commit": "c50c22301b731b0c26c6713ea1f6a3b0e078be08",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/azure-kusto/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected] --version=3.0.6369",
"readme": "specification/azure-kusto/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-09-18"
self.api_version = "2021-01-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-kusto/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,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


Expand All @@ -39,12 +41,16 @@ class KustoManagementClient(object):
:vartype databases: azure.mgmt.kusto.operations.DatabasesOperations
:ivar database_principal_assignments: DatabasePrincipalAssignmentsOperations operations
:vartype database_principal_assignments: azure.mgmt.kusto.operations.DatabasePrincipalAssignmentsOperations
:ivar scripts: ScriptsOperations operations
:vartype scripts: azure.mgmt.kusto.operations.ScriptsOperations
:ivar attached_database_configurations: AttachedDatabaseConfigurationsOperations operations
:vartype attached_database_configurations: azure.mgmt.kusto.operations.AttachedDatabaseConfigurationsOperations
:ivar data_connections: DataConnectionsOperations operations
:vartype data_connections: azure.mgmt.kusto.operations.DataConnectionsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.kusto.operations.Operations
:ivar operations_results: OperationsResultsOperations operations
:vartype operations_results: azure.mgmt.kusto.operations.OperationsResultsOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
Expand All @@ -68,6 +74,7 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.clusters = ClustersOperations(
Expand All @@ -78,12 +85,16 @@ 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)

def close(self):
# type: () -> None
Expand Down
72 changes: 61 additions & 11 deletions sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chosen_version": "2020-09-18",
"total_api_version_list": ["2020-09-18"],
"chosen_version": "2021-01-01",
"total_api_version_list": ["2021-01-01"],
"client": {
"name": "KustoManagementClient",
"filename": "_kusto_management_client",
Expand All @@ -9,7 +9,9 @@
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": true
"client_side_validation": false,
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"KustoManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"KustoManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
},
"global_parameters": {
"sync": {
Expand All @@ -28,40 +30,88 @@
},
"async": {
"credential": {
"signature": "credential, # type: \"AsyncTokenCredential\"",
"signature": "credential: \"AsyncTokenCredential\",",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"signature": "subscription_id: str,",
"description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, subscription_id"
"call": "credential, subscription_id",
"service_client_specific": {
"sync": {
"api_version": {
"signature": "api_version=None, # type: Optional[str]",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url=None, # type: Optional[str]",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
},
"async": {
"api_version": {
"signature": "api_version: Optional[str] = None,",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url: Optional[str] = None,",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile: KnownProfiles = KnownProfiles.default,",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
}
}
},
"config": {
"credential": true,
"credential_scopes": ["https://management.azure.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null
"credential_key_header_name": null,
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"clusters": "ClustersOperations",
"cluster_principal_assignments": "ClusterPrincipalAssignmentsOperations",
"databases": "DatabasesOperations",
"database_principal_assignments": "DatabasePrincipalAssignmentsOperations",
"scripts": "ScriptsOperations",
"attached_database_configurations": "AttachedDatabaseConfigurationsOperations",
"data_connections": "DataConnectionsOperations",
"operations": "Operations"
"operations": "Operations",
"operations_results": "OperationsResultsOperations"
},
"operation_mixins": {
},
"sync_imports": "None",
"async_imports": "None"
"sync_imports": "None",
"async_imports": "None",
"operations": {
}
}
}
2 changes: 1 addition & 1 deletion sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0"
VERSION = "0.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-09-18"
self.api_version = "2021-01-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-kusto/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,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


Expand All @@ -37,12 +39,16 @@ class KustoManagementClient(object):
:vartype databases: azure.mgmt.kusto.aio.operations.DatabasesOperations
:ivar database_principal_assignments: DatabasePrincipalAssignmentsOperations operations
:vartype database_principal_assignments: azure.mgmt.kusto.aio.operations.DatabasePrincipalAssignmentsOperations
:ivar scripts: ScriptsOperations operations
:vartype scripts: azure.mgmt.kusto.aio.operations.ScriptsOperations
:ivar attached_database_configurations: AttachedDatabaseConfigurationsOperations operations
:vartype attached_database_configurations: azure.mgmt.kusto.aio.operations.AttachedDatabaseConfigurationsOperations
:ivar data_connections: DataConnectionsOperations operations
:vartype data_connections: azure.mgmt.kusto.aio.operations.DataConnectionsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.kusto.aio.operations.Operations
:ivar operations_results: OperationsResultsOperations operations
:vartype operations_results: azure.mgmt.kusto.aio.operations.OperationsResultsOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
Expand All @@ -65,6 +71,7 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.clusters = ClustersOperations(
Expand All @@ -75,12 +82,16 @@ 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)

async def close(self) -> None:
await self._client.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,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',
]
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def list_by_cluster(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
api_version = "2021-01-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -142,7 +142,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
api_version = "2021-01-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -192,7 +192,7 @@ async def _create_or_update_initial(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
api_version = "2021-01-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -261,8 +261,8 @@ async def begin_create_or_update(
:type parameters: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
False for no polling, or your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either AttachedDatabaseConfiguration or the result of cls(response)
Expand Down Expand Up @@ -329,7 +329,7 @@ async def _delete_initial(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-18"
api_version = "2021-01-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -380,8 +380,8 @@ async def begin_delete(
:type attached_database_configuration_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
False for no polling, or your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
Expand Down
Loading

0 comments on commit 3e4a0e2

Please sign in to comment.