Kpi Args
data class KpiArgs(val aliases: Output<List<KpiAliasArgs>>? = null, val calculationWindow: Output<CalculationWindowTypes>? = null, val calculationWindowFieldName: Output<String>? = null, val description: Output<Map<String, String>>? = null, val displayName: Output<Map<String, String>>? = null, val entityType: Output<EntityTypes>? = null, val entityTypeName: Output<String>? = null, val expression: Output<String>? = null, val extracts: Output<List<KpiExtractArgs>>? = null, val filter: Output<String>? = null, val function: Output<KpiFunctions>? = null, val groupBy: Output<List<String>>? = null, val hubName: Output<String>? = null, val kpiName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val thresHolds: Output<KpiThresholdsArgs>? = null, val unit: Output<String>? = null) : ConvertibleToJava<KpiArgs>
The KPI resource format. Uses Azure REST API version 2017-04-26. In version 2.x of the Azure Native provider, it used API version 2017-04-26.
Example Usage
Kpi_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var kpi = new AzureNative.CustomerInsights.Kpi("kpi", new()
{
Aliases = new[]
{
new AzureNative.CustomerInsights.Inputs.KpiAliasArgs
{
AliasName = "alias",
Expression = "Id+4",
},
},
CalculationWindow = AzureNative.CustomerInsights.CalculationWindowTypes.Day,
Description =
{
{ "en-us", "Kpi Description" },
},
DisplayName =
{
{ "en-us", "Kpi DisplayName" },
},
EntityType = AzureNative.CustomerInsights.EntityTypes.Profile,
EntityTypeName = "testProfile2327128",
Expression = "SavingAccountBalance",
Function = AzureNative.CustomerInsights.KpiFunctions.Sum,
GroupBy = new[]
{
"SavingAccountBalance",
},
HubName = "sdkTestHub",
KpiName = "kpiTest45453647",
ResourceGroupName = "TestHubRG",
ThresHolds = new AzureNative.CustomerInsights.Inputs.KpiThresholdsArgs
{
IncreasingKpi = true,
LowerLimit = 5,
UpperLimit = 50,
},
Unit = "unit",
});
});
Content copied to clipboard
package main
import (
customerinsights "github.com/pulumi/pulumi-azure-native-sdk/customerinsights/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := customerinsights.NewKpi(ctx, "kpi", &customerinsights.KpiArgs{
Aliases: customerinsights.KpiAliasArray{
&customerinsights.KpiAliasArgs{
AliasName: pulumi.String("alias"),
Expression: pulumi.String("Id+4"),
},
},
CalculationWindow: customerinsights.CalculationWindowTypesDay,
Description: pulumi.StringMap{
"en-us": pulumi.String("Kpi Description"),
},
DisplayName: pulumi.StringMap{
"en-us": pulumi.String("Kpi DisplayName"),
},
EntityType: customerinsights.EntityTypesProfile,
EntityTypeName: pulumi.String("testProfile2327128"),
Expression: pulumi.String("SavingAccountBalance"),
Function: customerinsights.KpiFunctionsSum,
GroupBy: pulumi.StringArray{
pulumi.String("SavingAccountBalance"),
},
HubName: pulumi.String("sdkTestHub"),
KpiName: pulumi.String("kpiTest45453647"),
ResourceGroupName: pulumi.String("TestHubRG"),
ThresHolds: &customerinsights.KpiThresholdsArgs{
IncreasingKpi: pulumi.Bool(true),
LowerLimit: pulumi.Float64(5),
UpperLimit: pulumi.Float64(50),
},
Unit: pulumi.String("unit"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.customerinsights.Kpi;
import com.pulumi.azurenative.customerinsights.KpiArgs;
import com.pulumi.azurenative.customerinsights.inputs.KpiAliasArgs;
import com.pulumi.azurenative.customerinsights.inputs.KpiThresholdsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var kpi = new Kpi("kpi", KpiArgs.builder()
.aliases(KpiAliasArgs.builder()
.aliasName("alias")
.expression("Id+4")
.build())
.calculationWindow("Day")
.description(Map.of("en-us", "Kpi Description"))
.displayName(Map.of("en-us", "Kpi DisplayName"))
.entityType("Profile")
.entityTypeName("testProfile2327128")
.expression("SavingAccountBalance")
.function("Sum")
.groupBy("SavingAccountBalance")
.hubName("sdkTestHub")
.kpiName("kpiTest45453647")
.resourceGroupName("TestHubRG")
.thresHolds(KpiThresholdsArgs.builder()
.increasingKpi(true)
.lowerLimit(5)
.upperLimit(50)
.build())
.unit("unit")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:customerinsights:Kpi sdkTestHub/kpiTest45453647 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/kpi/{kpiName}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(aliases: Output<List<KpiAliasArgs>>? = null, calculationWindow: Output<CalculationWindowTypes>? = null, calculationWindowFieldName: Output<String>? = null, description: Output<Map<String, String>>? = null, displayName: Output<Map<String, String>>? = null, entityType: Output<EntityTypes>? = null, entityTypeName: Output<String>? = null, expression: Output<String>? = null, extracts: Output<List<KpiExtractArgs>>? = null, filter: Output<String>? = null, function: Output<KpiFunctions>? = null, groupBy: Output<List<String>>? = null, hubName: Output<String>? = null, kpiName: Output<String>? = null, resourceGroupName: Output<String>? = null, thresHolds: Output<KpiThresholdsArgs>? = null, unit: Output<String>? = null)
Properties
Link copied to clipboard
The aliases.
Link copied to clipboard
The calculation window.
Link copied to clipboard
Name of calculation window field.
Link copied to clipboard
Localized description for the KPI.
Link copied to clipboard
Localized display name for the KPI.
Link copied to clipboard
The mapping entity type.
Link copied to clipboard
The mapping entity name.
Link copied to clipboard
The computation expression for the KPI.
Link copied to clipboard
The KPI extracts.
Link copied to clipboard
The computation function for the KPI.
Link copied to clipboard
The name of the resource group.
Link copied to clipboard
The KPI thresholds.