Prediction
The prediction 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
Predictions_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var prediction = new AzureNative.CustomerInsights.Prediction("prediction", new()
{
AutoAnalyze = true,
Description =
{
{ "en-us", "sdktest" },
},
DisplayName =
{
{ "en-us", "sdktest" },
},
Grades = new[] {},
HubName = "sdkTestHub",
InvolvedInteractionTypes = new[] {},
InvolvedKpiTypes = new[] {},
InvolvedRelationships = new[] {},
Mappings = new AzureNative.CustomerInsights.Inputs.PredictionMappingsArgs
{
Grade = "sdktest_Grade",
Reason = "sdktest_Reason",
Score = "sdktest_Score",
},
NegativeOutcomeExpression = "Customers.FirstName = 'Mike'",
PositiveOutcomeExpression = "Customers.FirstName = 'David'",
PredictionName = "sdktest",
PrimaryProfileType = "Customers",
ResourceGroupName = "TestHubRG",
ScopeExpression = "*",
ScoreLabel = "score label",
});
});
Content copied to clipboard
package main
import (
customerinsights "github.com/pulumi/pulumi-azure-native-sdk/customerinsights/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := customerinsights.NewPrediction(ctx, "prediction", &customerinsights.PredictionArgs{
AutoAnalyze: pulumi.Bool(true),
Description: pulumi.StringMap{
"en-us": pulumi.String("sdktest"),
},
DisplayName: pulumi.StringMap{
"en-us": pulumi.String("sdktest"),
},
Grades: customerinsights.PredictionGradesArray{},
HubName: pulumi.String("sdkTestHub"),
InvolvedInteractionTypes: pulumi.StringArray{},
InvolvedKpiTypes: pulumi.StringArray{},
InvolvedRelationships: pulumi.StringArray{},
Mappings: &customerinsights.PredictionMappingsArgs{
Grade: pulumi.String("sdktest_Grade"),
Reason: pulumi.String("sdktest_Reason"),
Score: pulumi.String("sdktest_Score"),
},
NegativeOutcomeExpression: pulumi.String("Customers.FirstName = 'Mike'"),
PositiveOutcomeExpression: pulumi.String("Customers.FirstName = 'David'"),
PredictionName: pulumi.String("sdktest"),
PrimaryProfileType: pulumi.String("Customers"),
ResourceGroupName: pulumi.String("TestHubRG"),
ScopeExpression: pulumi.String("*"),
ScoreLabel: pulumi.String("score label"),
})
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.Prediction;
import com.pulumi.azurenative.customerinsights.PredictionArgs;
import com.pulumi.azurenative.customerinsights.inputs.PredictionMappingsArgs;
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 prediction = new Prediction("prediction", PredictionArgs.builder()
.autoAnalyze(true)
.description(Map.of("en-us", "sdktest"))
.displayName(Map.of("en-us", "sdktest"))
.grades()
.hubName("sdkTestHub")
.involvedInteractionTypes()
.involvedKpiTypes()
.involvedRelationships()
.mappings(PredictionMappingsArgs.builder()
.grade("sdktest_Grade")
.reason("sdktest_Reason")
.score("sdktest_Score")
.build())
.negativeOutcomeExpression("Customers.FirstName = 'Mike'")
.positiveOutcomeExpression("Customers.FirstName = 'David'")
.predictionName("sdktest")
.primaryProfileType("Customers")
.resourceGroupName("TestHubRG")
.scopeExpression("*")
.scoreLabel("score label")
.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:Prediction sdkTestHub/sdktest /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/predictions/{predictionName}
Content copied to clipboard
Properties
Link copied to clipboard
Whether do auto analyze.
Link copied to clipboard
The Azure API version of the resource.
Link copied to clipboard
Description of the prediction.
Link copied to clipboard
Display name of the prediction.
Link copied to clipboard
The prediction grades.
Link copied to clipboard
Interaction types involved in the prediction.
Link copied to clipboard
KPI types involved in the prediction.
Link copied to clipboard
Relationships involved in the prediction.
Link copied to clipboard
Definition of the link mapping of prediction.
Link copied to clipboard
Negative outcome expression.
Link copied to clipboard
Positive outcome expression.
Link copied to clipboard
Name of the prediction.
Link copied to clipboard
Primary profile type.
Link copied to clipboard
Provisioning state.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Scope expression.
Link copied to clipboard
Score label.
Link copied to clipboard
System generated entities.