azure-native.customerinsights.Prediction
Explore with Pulumi AI
The prediction resource format. 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",
});
});
package main
import (
customerinsights "github.com/pulumi/pulumi-azure-native-sdk/customerinsights"
"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
})
}
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 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(Map.ofEntries(
Map.entry("grade", "sdktest_Grade"),
Map.entry("reason", "sdktest_Reason"),
Map.entry("score", "sdktest_Score")
))
.negativeOutcomeExpression("Customers.FirstName = 'Mike'")
.positiveOutcomeExpression("Customers.FirstName = 'David'")
.predictionName("sdktest")
.primaryProfileType("Customers")
.resourceGroupName("TestHubRG")
.scopeExpression("*")
.scoreLabel("score label")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
prediction = azure_native.customerinsights.Prediction("prediction",
auto_analyze=True,
description={
"en-us": "sdktest",
},
display_name={
"en-us": "sdktest",
},
grades=[],
hub_name="sdkTestHub",
involved_interaction_types=[],
involved_kpi_types=[],
involved_relationships=[],
mappings=azure_native.customerinsights.PredictionMappingsArgs(
grade="sdktest_Grade",
reason="sdktest_Reason",
score="sdktest_Score",
),
negative_outcome_expression="Customers.FirstName = 'Mike'",
positive_outcome_expression="Customers.FirstName = 'David'",
prediction_name="sdktest",
primary_profile_type="Customers",
resource_group_name="TestHubRG",
scope_expression="*",
score_label="score label")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const prediction = new azure_native.customerinsights.Prediction("prediction", {
autoAnalyze: true,
description: {
"en-us": "sdktest",
},
displayName: {
"en-us": "sdktest",
},
grades: [],
hubName: "sdkTestHub",
involvedInteractionTypes: [],
involvedKpiTypes: [],
involvedRelationships: [],
mappings: {
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",
});
resources:
prediction:
type: azure-native:customerinsights:Prediction
properties:
autoAnalyze: true
description:
en-us: sdktest
displayName:
en-us: sdktest
grades: []
hubName: sdkTestHub
involvedInteractionTypes: []
involvedKpiTypes: []
involvedRelationships: []
mappings:
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
Create Prediction Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Prediction(name: string, args: PredictionArgs, opts?: CustomResourceOptions);
@overload
def Prediction(resource_name: str,
args: PredictionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Prediction(resource_name: str,
opts: Optional[ResourceOptions] = None,
mappings: Optional[PredictionMappingsArgs] = None,
positive_outcome_expression: Optional[str] = None,
score_label: Optional[str] = None,
scope_expression: Optional[str] = None,
auto_analyze: Optional[bool] = None,
resource_group_name: Optional[str] = None,
primary_profile_type: Optional[str] = None,
negative_outcome_expression: Optional[str] = None,
hub_name: Optional[str] = None,
involved_kpi_types: Optional[Sequence[str]] = None,
involved_relationships: Optional[Sequence[str]] = None,
prediction_name: Optional[str] = None,
description: Optional[Mapping[str, str]] = None,
involved_interaction_types: Optional[Sequence[str]] = None,
grades: Optional[Sequence[PredictionGradesArgs]] = None,
display_name: Optional[Mapping[str, str]] = None)
func NewPrediction(ctx *Context, name string, args PredictionArgs, opts ...ResourceOption) (*Prediction, error)
public Prediction(string name, PredictionArgs args, CustomResourceOptions? opts = null)
public Prediction(String name, PredictionArgs args)
public Prediction(String name, PredictionArgs args, CustomResourceOptions options)
type: azure-native:customerinsights:Prediction
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PredictionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PredictionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PredictionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PredictionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PredictionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var predictionResource = new AzureNative.Customerinsights.Prediction("predictionResource", new()
{
Mappings =
{
{ "grade", "string" },
{ "reason", "string" },
{ "score", "string" },
},
PositiveOutcomeExpression = "string",
ScoreLabel = "string",
ScopeExpression = "string",
AutoAnalyze = false,
ResourceGroupName = "string",
PrimaryProfileType = "string",
NegativeOutcomeExpression = "string",
HubName = "string",
InvolvedKpiTypes = new[]
{
"string",
},
InvolvedRelationships = new[]
{
"string",
},
PredictionName = "string",
Description =
{
{ "string", "string" },
},
InvolvedInteractionTypes = new[]
{
"string",
},
Grades = new[]
{
{
{ "gradeName", "string" },
{ "maxScoreThreshold", 0 },
{ "minScoreThreshold", 0 },
},
},
DisplayName =
{
{ "string", "string" },
},
});
example, err := customerinsights.NewPrediction(ctx, "predictionResource", &customerinsights.PredictionArgs{
Mappings: map[string]interface{}{
"grade": "string",
"reason": "string",
"score": "string",
},
PositiveOutcomeExpression: "string",
ScoreLabel: "string",
ScopeExpression: "string",
AutoAnalyze: false,
ResourceGroupName: "string",
PrimaryProfileType: "string",
NegativeOutcomeExpression: "string",
HubName: "string",
InvolvedKpiTypes: []string{
"string",
},
InvolvedRelationships: []string{
"string",
},
PredictionName: "string",
Description: map[string]interface{}{
"string": "string",
},
InvolvedInteractionTypes: []string{
"string",
},
Grades: []map[string]interface{}{
map[string]interface{}{
"gradeName": "string",
"maxScoreThreshold": 0,
"minScoreThreshold": 0,
},
},
DisplayName: map[string]interface{}{
"string": "string",
},
})
var predictionResource = new Prediction("predictionResource", PredictionArgs.builder()
.mappings(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.positiveOutcomeExpression("string")
.scoreLabel("string")
.scopeExpression("string")
.autoAnalyze(false)
.resourceGroupName("string")
.primaryProfileType("string")
.negativeOutcomeExpression("string")
.hubName("string")
.involvedKpiTypes("string")
.involvedRelationships("string")
.predictionName("string")
.description(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.involvedInteractionTypes("string")
.grades(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.displayName(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
prediction_resource = azure_native.customerinsights.Prediction("predictionResource",
mappings={
grade: string,
reason: string,
score: string,
},
positive_outcome_expression=string,
score_label=string,
scope_expression=string,
auto_analyze=False,
resource_group_name=string,
primary_profile_type=string,
negative_outcome_expression=string,
hub_name=string,
involved_kpi_types=[string],
involved_relationships=[string],
prediction_name=string,
description={
string: string,
},
involved_interaction_types=[string],
grades=[{
gradeName: string,
maxScoreThreshold: 0,
minScoreThreshold: 0,
}],
display_name={
string: string,
})
const predictionResource = new azure_native.customerinsights.Prediction("predictionResource", {
mappings: {
grade: "string",
reason: "string",
score: "string",
},
positiveOutcomeExpression: "string",
scoreLabel: "string",
scopeExpression: "string",
autoAnalyze: false,
resourceGroupName: "string",
primaryProfileType: "string",
negativeOutcomeExpression: "string",
hubName: "string",
involvedKpiTypes: ["string"],
involvedRelationships: ["string"],
predictionName: "string",
description: {
string: "string",
},
involvedInteractionTypes: ["string"],
grades: [{
gradeName: "string",
maxScoreThreshold: 0,
minScoreThreshold: 0,
}],
displayName: {
string: "string",
},
});
type: azure-native:customerinsights:Prediction
properties:
autoAnalyze: false
description:
string: string
displayName:
string: string
grades:
- gradeName: string
maxScoreThreshold: 0
minScoreThreshold: 0
hubName: string
involvedInteractionTypes:
- string
involvedKpiTypes:
- string
involvedRelationships:
- string
mappings:
grade: string
reason: string
score: string
negativeOutcomeExpression: string
positiveOutcomeExpression: string
predictionName: string
primaryProfileType: string
resourceGroupName: string
scopeExpression: string
scoreLabel: string
Prediction Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Prediction resource accepts the following input properties:
- Auto
Analyze bool - Whether do auto analyze.
- Hub
Name string - The name of the hub.
- Mappings
Pulumi.
Azure Native. Customer Insights. Inputs. Prediction Mappings - Definition of the link mapping of prediction.
- Negative
Outcome stringExpression - Negative outcome expression.
- Positive
Outcome stringExpression - Positive outcome expression.
- Primary
Profile stringType - Primary profile type.
- Resource
Group stringName - The name of the resource group.
- Scope
Expression string - Scope expression.
- Score
Label string - Score label.
- Description Dictionary<string, string>
- Description of the prediction.
- Display
Name Dictionary<string, string> - Display name of the prediction.
- Grades
List<Pulumi.
Azure Native. Customer Insights. Inputs. Prediction Grades> - The prediction grades.
- Involved
Interaction List<string>Types - Interaction types involved in the prediction.
- Involved
Kpi List<string>Types - KPI types involved in the prediction.
- Involved
Relationships List<string> - Relationships involved in the prediction.
- Prediction
Name string - Name of the prediction.
- Auto
Analyze bool - Whether do auto analyze.
- Hub
Name string - The name of the hub.
- Mappings
Prediction
Mappings Args - Definition of the link mapping of prediction.
- Negative
Outcome stringExpression - Negative outcome expression.
- Positive
Outcome stringExpression - Positive outcome expression.
- Primary
Profile stringType - Primary profile type.
- Resource
Group stringName - The name of the resource group.
- Scope
Expression string - Scope expression.
- Score
Label string - Score label.
- Description map[string]string
- Description of the prediction.
- Display
Name map[string]string - Display name of the prediction.
- Grades
[]Prediction
Grades Args - The prediction grades.
- Involved
Interaction []stringTypes - Interaction types involved in the prediction.
- Involved
Kpi []stringTypes - KPI types involved in the prediction.
- Involved
Relationships []string - Relationships involved in the prediction.
- Prediction
Name string - Name of the prediction.
- auto
Analyze Boolean - Whether do auto analyze.
- hub
Name String - The name of the hub.
- mappings
Prediction
Mappings - Definition of the link mapping of prediction.
- negative
Outcome StringExpression - Negative outcome expression.
- positive
Outcome StringExpression - Positive outcome expression.
- primary
Profile StringType - Primary profile type.
- resource
Group StringName - The name of the resource group.
- scope
Expression String - Scope expression.
- score
Label String - Score label.
- description Map<String,String>
- Description of the prediction.
- display
Name Map<String,String> - Display name of the prediction.
- grades
List<Prediction
Grades> - The prediction grades.
- involved
Interaction List<String>Types - Interaction types involved in the prediction.
- involved
Kpi List<String>Types - KPI types involved in the prediction.
- involved
Relationships List<String> - Relationships involved in the prediction.
- prediction
Name String - Name of the prediction.
- auto
Analyze boolean - Whether do auto analyze.
- hub
Name string - The name of the hub.
- mappings
Prediction
Mappings - Definition of the link mapping of prediction.
- negative
Outcome stringExpression - Negative outcome expression.
- positive
Outcome stringExpression - Positive outcome expression.
- primary
Profile stringType - Primary profile type.
- resource
Group stringName - The name of the resource group.
- scope
Expression string - Scope expression.
- score
Label string - Score label.
- description {[key: string]: string}
- Description of the prediction.
- display
Name {[key: string]: string} - Display name of the prediction.
- grades
Prediction
Grades[] - The prediction grades.
- involved
Interaction string[]Types - Interaction types involved in the prediction.
- involved
Kpi string[]Types - KPI types involved in the prediction.
- involved
Relationships string[] - Relationships involved in the prediction.
- prediction
Name string - Name of the prediction.
- auto_
analyze bool - Whether do auto analyze.
- hub_
name str - The name of the hub.
- mappings
Prediction
Mappings Args - Definition of the link mapping of prediction.
- negative_
outcome_ strexpression - Negative outcome expression.
- positive_
outcome_ strexpression - Positive outcome expression.
- primary_
profile_ strtype - Primary profile type.
- resource_
group_ strname - The name of the resource group.
- scope_
expression str - Scope expression.
- score_
label str - Score label.
- description Mapping[str, str]
- Description of the prediction.
- display_
name Mapping[str, str] - Display name of the prediction.
- grades
Sequence[Prediction
Grades Args] - The prediction grades.
- involved_
interaction_ Sequence[str]types - Interaction types involved in the prediction.
- involved_
kpi_ Sequence[str]types - KPI types involved in the prediction.
- involved_
relationships Sequence[str] - Relationships involved in the prediction.
- prediction_
name str - Name of the prediction.
- auto
Analyze Boolean - Whether do auto analyze.
- hub
Name String - The name of the hub.
- mappings Property Map
- Definition of the link mapping of prediction.
- negative
Outcome StringExpression - Negative outcome expression.
- positive
Outcome StringExpression - Positive outcome expression.
- primary
Profile StringType - Primary profile type.
- resource
Group StringName - The name of the resource group.
- scope
Expression String - Scope expression.
- score
Label String - Score label.
- description Map<String>
- Description of the prediction.
- display
Name Map<String> - Display name of the prediction.
- grades List<Property Map>
- The prediction grades.
- involved
Interaction List<String>Types - Interaction types involved in the prediction.
- involved
Kpi List<String>Types - KPI types involved in the prediction.
- involved
Relationships List<String> - Relationships involved in the prediction.
- prediction
Name String - Name of the prediction.
Outputs
All input properties are implicitly available as output properties. Additionally, the Prediction resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- Provisioning
State string - Provisioning state.
- System
Generated Pulumi.Entities Azure Native. Customer Insights. Outputs. Prediction Response System Generated Entities - System generated entities.
- Tenant
Id string - The hub name.
- Type string
- Resource type.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- Provisioning
State string - Provisioning state.
- System
Generated PredictionEntities Response System Generated Entities - System generated entities.
- Tenant
Id string - The hub name.
- Type string
- Resource type.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- provisioning
State String - Provisioning state.
- system
Generated PredictionEntities Response System Generated Entities - System generated entities.
- tenant
Id String - The hub name.
- type String
- Resource type.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Resource name.
- provisioning
State string - Provisioning state.
- system
Generated PredictionEntities Response System Generated Entities - System generated entities.
- tenant
Id string - The hub name.
- type string
- Resource type.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Resource name.
- provisioning_
state str - Provisioning state.
- system_
generated_ Predictionentities Response System Generated Entities - System generated entities.
- tenant_
id str - The hub name.
- type str
- Resource type.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- provisioning
State String - Provisioning state.
- system
Generated Property MapEntities - System generated entities.
- tenant
Id String - The hub name.
- type String
- Resource type.
Supporting Types
PredictionGrades, PredictionGradesArgs
- Grade
Name string - Name of the grade.
- Max
Score intThreshold - Maximum score threshold.
- Min
Score intThreshold - Minimum score threshold.
- Grade
Name string - Name of the grade.
- Max
Score intThreshold - Maximum score threshold.
- Min
Score intThreshold - Minimum score threshold.
- grade
Name String - Name of the grade.
- max
Score IntegerThreshold - Maximum score threshold.
- min
Score IntegerThreshold - Minimum score threshold.
- grade
Name string - Name of the grade.
- max
Score numberThreshold - Maximum score threshold.
- min
Score numberThreshold - Minimum score threshold.
- grade_
name str - Name of the grade.
- max_
score_ intthreshold - Maximum score threshold.
- min_
score_ intthreshold - Minimum score threshold.
- grade
Name String - Name of the grade.
- max
Score NumberThreshold - Maximum score threshold.
- min
Score NumberThreshold - Minimum score threshold.
PredictionMappings, PredictionMappingsArgs
PredictionResponseGrades, PredictionResponseGradesArgs
- Grade
Name string - Name of the grade.
- Max
Score intThreshold - Maximum score threshold.
- Min
Score intThreshold - Minimum score threshold.
- Grade
Name string - Name of the grade.
- Max
Score intThreshold - Maximum score threshold.
- Min
Score intThreshold - Minimum score threshold.
- grade
Name String - Name of the grade.
- max
Score IntegerThreshold - Maximum score threshold.
- min
Score IntegerThreshold - Minimum score threshold.
- grade
Name string - Name of the grade.
- max
Score numberThreshold - Maximum score threshold.
- min
Score numberThreshold - Minimum score threshold.
- grade_
name str - Name of the grade.
- max_
score_ intthreshold - Maximum score threshold.
- min_
score_ intthreshold - Minimum score threshold.
- grade
Name String - Name of the grade.
- max
Score NumberThreshold - Maximum score threshold.
- min
Score NumberThreshold - Minimum score threshold.
PredictionResponseMappings, PredictionResponseMappingsArgs
PredictionResponseSystemGeneratedEntities, PredictionResponseSystemGeneratedEntitiesArgs
- Generated
Interaction List<string>Types - Generated interaction types.
- Generated
Kpis Dictionary<string, string> - Generated KPIs.
- Generated
Links List<string> - Generated links.
- Generated
Interaction []stringTypes - Generated interaction types.
- Generated
Kpis map[string]string - Generated KPIs.
- Generated
Links []string - Generated links.
- generated
Interaction List<String>Types - Generated interaction types.
- generated
Kpis Map<String,String> - Generated KPIs.
- generated
Links List<String> - Generated links.
- generated
Interaction string[]Types - Generated interaction types.
- generated
Kpis {[key: string]: string} - Generated KPIs.
- generated
Links string[] - Generated links.
- generated_
interaction_ Sequence[str]types - Generated interaction types.
- generated_
kpis Mapping[str, str] - Generated KPIs.
- generated_
links Sequence[str] - Generated links.
- generated
Interaction List<String>Types - Generated interaction types.
- generated
Kpis Map<String> - Generated KPIs.
- generated
Links List<String> - Generated links.
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/c909e979-ef71-4def-a970-bc7c154db8c5/resourceGroups/TestHubRG/providers/Microsoft.CustomerInsights/hubs/azSdkTestHub/predictions/sdktest
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0