def cluster_create(cmd, resource_group_name, cluster_name, sku, location=None, capacity=None, custom_headers=None, raw=False, polling=True, no_wait=False, **kwargs): from azure.mgmt.kusto.models import Cluster, AzureSku from azure.cli.command_modules.kusto._client_factory import cf_cluster if location is None: location = _get_resource_group_location(cmd.cli_ctx, resource_group_name) _client = cf_cluster(cmd.cli_ctx, None) _cluster = Cluster(location=location, sku=AzureSku(name=sku, capacity=capacity)) return sdk_no_wait(no_wait, _client.create_or_update, resource_group_name=resource_group_name, cluster_name=cluster_name, parameters=_cluster, custom_headers=custom_headers, raw=raw, polling=polling, operation_config=kwargs)
def _cluster_get(cmd, resource_group_name, cluster_name, custom_headers=None, raw=False, **kwargs): from azure.cli.command_modules.kusto._client_factory import cf_cluster _client = cf_cluster(cmd.cli_ctx, None) return _client.get(resource_group_name=resource_group_name, cluster_name=cluster_name, custom_headers=custom_headers, raw=raw, operation_config=kwargs)