AzureKustoBuilderExtensions Methods
Class Methods 5 members
Extension methods for adding Kusto resources to the application model.
AddAzureKustoCluster(IDistributedApplicationBuilder, string) Section titled AddAzureKustoCluster(IDistributedApplicationBuilder, string) extension IResourceBuilder<AzureKustoClusterResource> Adds an Azure Data Explorer (Kusto) cluster resource to the application model.
public static class AzureKustoBuilderExtensions{ public static IResourceBuilder<AzureKustoClusterResource> AddAzureKustoCluster( this IDistributedApplicationBuilder builder, string name) { // ... }}Parameters
builder IDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder. name string The name of the resource. This name will be used as the connection string name when referenced in a dependency. Returns
IResourceBuilder<AzureKustoClusterResource> A reference to the ApplicationModel.IResourceBuilder`1. Remarks
When adding an AzureKustoClusterResource to your application model the resource can then be referenced by other resources using the resource name. When the dependent resource is using the extension method ResourceBuilderExtensions.WaitFor then the dependent resource will wait until the Kusto database is available.
By default references to the Azure Data Explorer database resources will be assigned the following roles: - KustoDatabasePrincipalRole.User
AddReadWriteDatabase(IResourceBuilder<AzureKustoClusterResource>, string, string?) Section titled AddReadWriteDatabase(IResourceBuilder<AzureKustoClusterResource>, string, string?) extension IResourceBuilder<AzureKustoReadWriteDatabaseResource> Adds a Kusto read-write database to the application model.
public static class AzureKustoBuilderExtensions{ public static IResourceBuilder<AzureKustoReadWriteDatabaseResource> AddReadWriteDatabase( this IResourceBuilder<AzureKustoClusterResource> builder, string name, string? databaseName = null) { // ... }}Parameters
builder IResourceBuilder<AzureKustoClusterResource> The Kusto server resource builder. name string The name of the resource. This name will be used as the connection string name when referenced in a dependency. databaseName string? optional The name of the database. If not provided, this defaults to the same value as name. Returns
IResourceBuilder<AzureKustoReadWriteDatabaseResource> A reference to the ApplicationModel.IResourceBuilder`1. RunAsEmulator(IResourceBuilder<AzureKustoClusterResource>, Action<IResourceBuilder<AzureKustoEmulatorResource>>) Section titled RunAsEmulator(IResourceBuilder<AzureKustoClusterResource>, Action<IResourceBuilder<AzureKustoEmulatorResource>>) extension IResourceBuilder<AzureKustoClusterResource> Configures the Kusto resource to run as an emulator using the Kustainer container.
public static class AzureKustoBuilderExtensions{ public static IResourceBuilder<AzureKustoClusterResource> RunAsEmulator( this IResourceBuilder<AzureKustoClusterResource> builder, Action<IResourceBuilder<AzureKustoEmulatorResource>>? configureContainer = null) { // ... }}Parameters
builder IResourceBuilder<AzureKustoClusterResource> The resource builder to configure. configureContainer Action<IResourceBuilder<AzureKustoEmulatorResource>> optional Optional action to configure the Kusto emulator container. Returns
IResourceBuilder<AzureKustoClusterResource> The resource builder. Remarks
This version of the package defaults to the tag of the / container image.
WithCreationScript(IResourceBuilder<AzureKustoReadWriteDatabaseResource>, string) Section titled WithCreationScript(IResourceBuilder<AzureKustoReadWriteDatabaseResource>, string) extension IResourceBuilder<AzureKustoReadWriteDatabaseResource> Defines the script used to create the database.
public static class AzureKustoBuilderExtensions{ public static IResourceBuilder<AzureKustoReadWriteDatabaseResource> WithCreationScript( this IResourceBuilder<AzureKustoReadWriteDatabaseResource> builder, string script) { // ... }}Parameters
builder IResourceBuilder<AzureKustoReadWriteDatabaseResource> The resource builder to configure. script string KQL script to create databases, tables, or data. Returns
IResourceBuilder<AzureKustoReadWriteDatabaseResource> The resource builder. Remarks
This script will only be executed when the Kusto resource is running in emulator mode. In production scenarios, the database creation should be handled as part of the provisioning process.
WithHostPort(IResourceBuilder<AzureKustoEmulatorResource>, int) Section titled WithHostPort(IResourceBuilder<AzureKustoEmulatorResource>, int) extension IResourceBuilder<AzureKustoEmulatorResource> Configures the host port that the Kusto emulator listens on for HTTP query requests.
public static class AzureKustoBuilderExtensions{ public static IResourceBuilder<AzureKustoEmulatorResource> WithHostPort( this IResourceBuilder<AzureKustoEmulatorResource> builder, int port) { // ... }}Parameters
builder IResourceBuilder<AzureKustoEmulatorResource> Kusto emulator resource builder. port int Host port to use. Returns
IResourceBuilder<AzureKustoEmulatorResource> An ApplicationModel.IResourceBuilder`1 for the AzureKustoEmulatorResource.