az timeseriesinsights environment longterm

Create or update a longterm environment in the specified subscription and resource group.

Commands

az timeseriesinsights environment longterm create

Create or update a longterm environment in the specified subscription and resource group.

az timeseriesinsights environment longterm update

Update a longterm environment in the specified subscription and resource group.

az timeseriesinsights environment longterm create

Create or update a longterm environment in the specified subscription and resource group.

az timeseriesinsights environment longterm create --data-retention
                                                  --name
                                                  --resource-group
                                                  --sku-capacity
                                                  --sku-name {L1, P1, S1, S2}
                                                  --storage-account-name
                                                  --storage-management-key
                                                  --time-series-id-properties
                                                  [--location]
                                                  [--no-wait]
                                                  [--tags]

Examples

Create storage account and use it to create a longterm environment

storage=mystorageaccount
rg={rg}
az storage account create -g $rg -n $storage --https-only
key=$(az storage account keys list -g $rg -n $storage --query [0].value --output tsv)
az timeseriesinsights environment longterm create -g $rg -n {env} --location westus --sku-name L1 --sku-capacity 1 --data-retention 7 --time-series-id-properties DeviceId1 --storage-account-name $storage --storage-management-key $key

Required Parameters

--data-retention

The number of days the environment's events will be available for query from the warm store.

--name -n

The name of the Time Series Insights environment associated with the specified resource group.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--sku-capacity

The capacity of the sku. For standard environments, this value can be changed to support scale out of environments after they have been created.

--sku-name

The sku determines the type of environment, either standard (S1 or S2) or long-term (L1). For standard environments the sku determines the capacity of the environment, the ingress rate, and the billing rate.

accepted values: L1, P1, S1, S2
--storage-account-name

The name of the storage account that will hold the environment's long term data.

--storage-management-key

The value of the management key that grants the Time Series Insights service write access to the storage account. This property is not shown in environment responses.

--time-series-id-properties

Required. The list of event properties which will be used to define the environment's time series id.

Optional Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--no-wait

Do not wait for the long-running operation to finish.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

az timeseriesinsights environment longterm update

Update a longterm environment in the specified subscription and resource group.

az timeseriesinsights environment longterm update --name
                                                  --resource-group
                                                  [--data-retention]
                                                  [--no-wait]
                                                  [--storage-management-key]
                                                  [--tags]

Examples

Update dataRetention

az timeseriesinsights environment longterm update -g {rg} -n {env} --data-retention 8

Update storageManagementKey

az timeseriesinsights environment longterm update -g {rg} -n {env} --storage-management-key xxx

Required Parameters

--name -n

The name of the Time Series Insights environment associated with the specified resource group.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--data-retention

The number of days the environment's events will be available for query from the warm store.

--no-wait

Do not wait for the long-running operation to finish.

--storage-management-key

The value of the management key that grants the Time Series Insights service write access to the storage account. This property is not shown in environment responses.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.