# AzureKustoReadWriteDatabaseResource

- Module: [Aspire.Hosting.Azure.Kusto](/reference/api/typescript/aspire.hosting.azure.kusto.md)
- Version: `13.4.0-preview.1.26281.18`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire)

Represents an Azure Kusto read-write database resource, which is a child resource of a {@ats-ref type:AzureKustoClusterResource}.

## Definition

```typescript
interface AzureKustoReadWriteDatabaseResource
  extends IExpressionValue,
    IManifestExpressionProvider,
    IResource,
    IResourceWithConnectionString,
    IResourceWithParent,
    AzureKustoClusterResource]],
    IValueProvider,
    IValueWithReferences {
  readonly connectionStringExpression: ReferenceExpression;
  readonly databaseName: string;
  readonly parent: AzureKustoClusterResource;
  getDatabaseCreationScript(): string;
  withCreationScript(script: string): AzureKustoReadWriteDatabaseResource;
}
```

## Properties

- `connectionStringExpression`: `ReferenceExpression` `get` -- Gets the connection string expression for the Kusto database.
- `databaseName`: `string` `get` -- Gets the database name.
- `parent`: [AzureKustoClusterResource](/reference/api/typescript/aspire.hosting.azure.kusto/azurekustoclusterresource.md) `get` -- Gets the parent Kusto resource.

## Methods

- [getDatabaseCreationScript](/reference/api/typescript/aspire.hosting.azure.kusto/azurekustoreadwritedatabaseresource/getdatabasecreationscript.md) -- `method` -- Gets the database creation script from the resource annotation if it exists. If not, creates the default database creation script.
    ```typescript
  getDatabaseCreationScript(): string
  ```
- [withCreationScript](/reference/api/typescript/aspire.hosting.azure.kusto/azurekustoreadwritedatabaseresource/withcreationscript.md) -- `method` -- Defines the script used to create the database.
    ```typescript
  withCreationScript(script: string): AzureKustoReadWriteDatabaseResource
  ```
