Method begin_create_or_update returns an instance of LROPoller, see LROPoller class to get more information. Poller = cluster_operations.begin_create_or_update(resource_group_name, cluster_name, cluster)Ĭreate a cluster is a long running operation. Kusto_management_client = KustoManagementClient(credentials, subscription_id)Ĭluster_operations = kusto_management_client.clusters Subscription_id = "xxxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxxx"Ĭredentials = ServicePrincipalCredentials(Ĭluster = Cluster(location=location, sku=AzureSku(name=sku_name, capacity=capacity, tier=tier)) Tenant_id = "xxxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxxx"Ĭlient_id = "xxxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxxx" Run the following command to check whether your cluster was successfully created: (resourceGroupName, clusterName) Ĭonfirm the successful creation of the cluster by verifying the result contains provisioningState as Succeeded.Ĭreate your cluster by using the following command: from import KustoManagementClientįrom import Cluster, AzureSkuįrom import ServicePrincipalCredentials The resource group name where the cluster will be created.Ĭreate a cluster is a long running operation, so it's highly recommended to use CreateOrUpdateAsync, instead of CreateOrUpdate. The SKU that will be used for your cluster. Var cluster = new Cluster(location, sku) Īwait (resourceGroupName, clusterName, cluster) Var sku = new AzureSku(skuName, tier, capacity) Var kustoManagementClient = new KustoManagementClient(credentials) Var credentials = new TokenCredentials(result.AccessToken, result.AccessTokenType) Var result = await authenticationContext.AcquireTokenAsync(resource: "", clientCredential: credential) Var credential = new ClientCredential(clientId, clientSecret) Var authenticationContext = new AuthenticationContext($"") Var subscriptionId = "xxxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxxx" Var clientSecret = "PlaceholderClientSecret" //Client Secret Var clientId = "xxxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxxx" //Application ID Choose the relevant tab for your preferred method to create the cluster.Ĭreate your cluster by using the following code: var tenantId = "xxxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxxx" //Directory (tenant) ID This section guides you through the process of creating an Azure Data Explorer cluster. When running Azure CLI locally or in the Azure Cloud Shell, you need to install the Az.Kusto module on your device: Install-Module -Name Az.Kusto Set the subscription where you want your cluster to be created: Set-AzContext -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" Run the following command to sign in to Azure: Connect-AzAccount If you choose to install and use PowerShell locally, follow the steps in Configure parameters.Replace testrg with the name of the resource group that you want to use: az group create -name testrg -location westus Set the resource group where you want your cluster to be created. Replace MyAzureSub with the name of the Azure subscription that you want to use: az account set -subscription MyAzureSub Set the subscription where you want your cluster to be created. Run the following command to sign in to Azure: az login Install extension to use the latest Kusto CLI version: az extension add -n kusto If you're running the CLI locally, follow these steps to set up the environment: The following steps aren't required if you're running commands in Azure Cloud Shell. If you need to install or upgrade, see Install the Azure CLI. This article requires the Azure CLI version 2.0.4 or later.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |