az_kusto_database: Kusto/Azure Data Explorer database resource class

az_kusto_databaseR Documentation

Kusto/Azure Data Explorer database resource class

Description

Class representing a Kusto database, exposing methods for working with it.

Methods

The following methods are available, in addition to those provided by the AzureRMR::az_resource class:

  • new(...): Initialize a new storage object. See 'Initialization'.

  • add_principals(...): Add new database principals. See Principals below.

  • remove_principals(...): Remove database principals.

  • list_principals(): Retrieve all database principals, as a data frame.

  • get_query_endpoint(): Get a query endpoint object for interacting with the database.

  • get_ingestion_endpoint(): Get an ingestion endpoint object for interacting with the database.

Initialization

Initializing a new object of this class can either retrieve an existing Kusto database, or create a new database on the server. Generally, the best way to initialize an object is via the get_database, list_databases() and create_database methods of the az_kusto class, which handle the details automatically.

Principals

This class provides methods for managing the principals of a database.

add_principal takes the following arguments. It returns a data frame with one row per principal, containing the details for each principal.

  • name: The name of the principal to create.

  • role: The role of the principal, for example "Admin" or "User".

  • type: The type of principal, either "User" or "App".

  • fqn: The fully qualified name of the principal, for example "aaduser=username@mydomain" for an Azure Active Directory account. If supplied, the other details will be obtained from this.

  • email: For a user principal, the email address.

  • app_id: For an application principal, the ID.

remove_principal removes a principal. It takes the same arguments as add_principal; if the supplied details do not match the actual details for the principal, it is not removed.

See Also

az_kusto, kusto_database_endpoint, create_database, get_database, delete_database

Kusto/Azure Data Explorer documentation,

Examples

## Not run: 

# recommended way of retrieving a resource: via a resource group object
db <- resgroup$
    get_kusto_cluster("mykusto")$
    get_database("mydatabase")

# list principals
db$list_principals()

# add a new principal
db$add_principal("New User", role="User", fqn="aaduser=username@mydomain")

# get the endpoint
db$get_database_endpoint(use_integer64=FALSE)


## End(Not run)

AzureKusto documentation built on March 31, 2023, 5:24 p.m.