Skip to content

Commit

Permalink
CodeGen from PR 16581 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
[Synapse]Add auto gen readme files for cli kusto support (Azure#16581)

* Add blockchain to latest profile

* Add additional types

* addclikustosupportautogenfiles

* removealias

* addrepo

Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com>
  • Loading branch information
SDKAuto and markcowl committed Nov 3, 2021
1 parent cbb395e commit eee33d4
Show file tree
Hide file tree
Showing 13 changed files with 148 additions and 240 deletions.
2 changes: 1 addition & 1 deletion sdk/synapse/azure-mgmt-synapse/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
"commit": "f8aa8bcbac3d389a1ed5b9c77f1bcb6cc2074a7d",
"commit": "64b91c09704b103f1a98719300b47c413c75bbe3",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/synapse/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/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
"readme": "specification/synapse/resource-manager/readme.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@
"spark_configuration": "SparkConfigurationOperations",
"spark_configurations": "SparkConfigurationsOperations",
"kusto_operations": "KustoOperationsOperations",
"kusto_pool": "KustoPoolOperations",
"kusto_pools": "KustoPoolsOperations",
"kusto_pool_child_resource": "KustoPoolChildResourceOperations",
"kusto_pool_attached_database_configurations": "KustoPoolAttachedDatabaseConfigurationsOperations",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
from .operations import SparkConfigurationOperations
from .operations import SparkConfigurationsOperations
from .operations import KustoOperationsOperations
from .operations import KustoPoolOperations
from .operations import KustoPoolsOperations
from .operations import KustoPoolChildResourceOperations
from .operations import KustoPoolAttachedDatabaseConfigurationsOperations
Expand Down Expand Up @@ -228,8 +227,6 @@ class SynapseManagementClient(object):
:vartype spark_configurations: azure.mgmt.synapse.operations.SparkConfigurationsOperations
:ivar kusto_operations: KustoOperationsOperations operations
:vartype kusto_operations: azure.mgmt.synapse.operations.KustoOperationsOperations
:ivar kusto_pool: KustoPoolOperations operations
:vartype kusto_pool: azure.mgmt.synapse.operations.KustoPoolOperations
:ivar kusto_pools: KustoPoolsOperations operations
:vartype kusto_pools: azure.mgmt.synapse.operations.KustoPoolsOperations
:ivar kusto_pool_child_resource: KustoPoolChildResourceOperations operations
Expand Down Expand Up @@ -400,8 +397,6 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.kusto_operations = KustoOperationsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.kusto_pool = KustoPoolOperations(
self._client, self._config, self._serialize, self._deserialize)
self.kusto_pools = KustoPoolsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.kusto_pool_child_resource = KustoPoolChildResourceOperations(
Expand Down
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 = "2.1.0b2"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
from .operations import SparkConfigurationOperations
from .operations import SparkConfigurationsOperations
from .operations import KustoOperationsOperations
from .operations import KustoPoolOperations
from .operations import KustoPoolsOperations
from .operations import KustoPoolChildResourceOperations
from .operations import KustoPoolAttachedDatabaseConfigurationsOperations
Expand Down Expand Up @@ -226,8 +225,6 @@ class SynapseManagementClient(object):
:vartype spark_configurations: azure.mgmt.synapse.aio.operations.SparkConfigurationsOperations
:ivar kusto_operations: KustoOperationsOperations operations
:vartype kusto_operations: azure.mgmt.synapse.aio.operations.KustoOperationsOperations
:ivar kusto_pool: KustoPoolOperations operations
:vartype kusto_pool: azure.mgmt.synapse.aio.operations.KustoPoolOperations
:ivar kusto_pools: KustoPoolsOperations operations
:vartype kusto_pools: azure.mgmt.synapse.aio.operations.KustoPoolsOperations
:ivar kusto_pool_child_resource: KustoPoolChildResourceOperations operations
Expand Down Expand Up @@ -397,8 +394,6 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.kusto_operations = KustoOperationsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.kusto_pool = KustoPoolOperations(
self._client, self._config, self._serialize, self._deserialize)
self.kusto_pools = KustoPoolsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.kusto_pool_child_resource = KustoPoolChildResourceOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
from ._spark_configuration_operations import SparkConfigurationOperations
from ._spark_configurations_operations import SparkConfigurationsOperations
from ._kusto_operations_operations import KustoOperationsOperations
from ._kusto_pool_operations import KustoPoolOperations
from ._kusto_pools_operations import KustoPoolsOperations
from ._kusto_pool_child_resource_operations import KustoPoolChildResourceOperations
from ._kusto_pool_attached_database_configurations_operations import KustoPoolAttachedDatabaseConfigurationsOperations
Expand Down Expand Up @@ -146,7 +145,6 @@
'SparkConfigurationOperations',
'SparkConfigurationsOperations',
'KustoOperationsOperations',
'KustoPoolOperations',
'KustoPoolsOperations',
'KustoPoolChildResourceOperations',
'KustoPoolAttachedDatabaseConfigurationsOperations',
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,73 @@ def __init__(self, client, config, serializer, deserializer) -> None:
self._deserialize = deserializer
self._config = config

def list_skus(
self,
**kwargs: Any
) -> AsyncIterable["_models.SkuDescriptionList"]:
"""Lists eligible SKUs for Kusto Pool resource.
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either SkuDescriptionList or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.synapse.models.SkuDescriptionList]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuDescriptionList"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-06-01-preview"
accept = "application/json"

def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

if not next_link:
# Construct URL
url = self.list_skus.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
request = self._client.get(url, query_parameters, header_parameters)
return request

async def extract_data(pipeline_response):
deserialized = self._deserialize('SkuDescriptionList', pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return None, AsyncList(list_of_elem)

async def get_next(next_link=None):
request = prepare_request(next_link)

pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200]:
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

return pipeline_response

return AsyncItemPaged(
get_next, extract_data
)
list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Synapse/skus'} # type: ignore

async def check_name_availability(
self,
location: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2257,6 +2257,9 @@ class EventHubDataConnection(DataConnection):
:ivar provisioning_state: The provisioned state of the resource. Possible values include:
"Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", "Canceled".
:vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState
: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 = {
Expand All @@ -2283,6 +2286,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__(
Expand All @@ -2299,6 +2303,7 @@ def __init__(
self.event_system_properties = kwargs.get('event_system_properties', None)
self.compression = kwargs.get('compression', None)
self.provisioning_state = None
self.managed_identity_resource_id = kwargs.get('managed_identity_resource_id', None)


class ExtendedServerBlobAuditingPolicy(ProxyResource):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2445,6 +2445,9 @@ class EventHubDataConnection(DataConnection):
:ivar provisioning_state: The provisioned state of the resource. Possible values include:
"Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", "Canceled".
:vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState
: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 = {
Expand All @@ -2471,6 +2474,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__(
Expand All @@ -2484,6 +2488,7 @@ def __init__(
data_format: Optional[Union[str, "EventHubDataFormat"]] = None,
event_system_properties: Optional[List[str]] = None,
compression: Optional[Union[str, "Compression"]] = None,
managed_identity_resource_id: Optional[str] = None,
**kwargs
):
super(EventHubDataConnection, self).__init__(location=location, **kwargs)
Expand All @@ -2496,6 +2501,7 @@ def __init__(
self.event_system_properties = event_system_properties
self.compression = compression
self.provisioning_state = None
self.managed_identity_resource_id = managed_identity_resource_id


class ExtendedServerBlobAuditingPolicy(ProxyResource):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
from ._spark_configuration_operations import SparkConfigurationOperations
from ._spark_configurations_operations import SparkConfigurationsOperations
from ._kusto_operations_operations import KustoOperationsOperations
from ._kusto_pool_operations import KustoPoolOperations
from ._kusto_pools_operations import KustoPoolsOperations
from ._kusto_pool_child_resource_operations import KustoPoolChildResourceOperations
from ._kusto_pool_attached_database_configurations_operations import KustoPoolAttachedDatabaseConfigurationsOperations
Expand Down Expand Up @@ -146,7 +145,6 @@
'SparkConfigurationOperations',
'SparkConfigurationsOperations',
'KustoOperationsOperations',
'KustoPoolOperations',
'KustoPoolsOperations',
'KustoPoolChildResourceOperations',
'KustoPoolAttachedDatabaseConfigurationsOperations',
Expand Down
Loading

0 comments on commit eee33d4

Please sign in to comment.