Segment Args
data class SegmentArgs(val description: Output<String>? = null, val name: Output<String>? = null, val pattern: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<SegmentArgs>
Provides a CloudWatch Evidently Segment resource.
Example Usage
Basic
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.evidently.Segment("example", {
name: "example",
pattern: "{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}",
tags: {
Key1: "example Segment",
},
});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
example = aws.evidently.Segment("example",
name="example",
pattern="{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}",
tags={
"Key1": "example Segment",
})
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Evidently.Segment("example", new()
{
Name = "example",
Pattern = "{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}",
Tags =
{
{ "Key1", "example Segment" },
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := evidently.NewSegment(ctx, "example", &evidently.SegmentArgs{
Name: pulumi.String("example"),
Pattern: pulumi.String("{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}"),
Tags: pulumi.StringMap{
"Key1": pulumi.String("example Segment"),
},
})
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.aws.evidently.Segment;
import com.pulumi.aws.evidently.SegmentArgs;
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 example = new Segment("example", SegmentArgs.builder()
.name("example")
.pattern("{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}")
.tags(Map.of("Key1", "example Segment"))
.build());
}
}
Content copied to clipboard
resources:
example:
type: aws:evidently:Segment
properties:
name: example
pattern: '{"Price":[{"numeric":[">",10,"<=",20]}]}'
tags:
Key1: example Segment
Content copied to clipboard
With JSON object in pattern
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.evidently.Segment("example", {
name: "example",
pattern: ` {
"Price": [
{
"numeric": [">",10,"<=",20]
}
]
}
`,
tags: {
Key1: "example Segment",
},
});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
example = aws.evidently.Segment("example",
name="example",
pattern=""" {
"Price": [
{
"numeric": [">",10,"<=",20]
}
]
}
""",
tags={
"Key1": "example Segment",
})
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Evidently.Segment("example", new()
{
Name = "example",
Pattern = @" {
""Price"": [
{
""numeric"": ["">"",10,""<="",20]
}
]
}
",
Tags =
{
{ "Key1", "example Segment" },
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := evidently.NewSegment(ctx, "example", &evidently.SegmentArgs{
Name: pulumi.String("example"),
Pattern: pulumi.String(` {
"Price": [
{
"numeric": [">",10,"<=",20]
}
]
}
`),
Tags: pulumi.StringMap{
"Key1": pulumi.String("example Segment"),
},
})
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.aws.evidently.Segment;
import com.pulumi.aws.evidently.SegmentArgs;
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 example = new Segment("example", SegmentArgs.builder()
.name("example")
.pattern("""
{
"Price": [
{
"numeric": [">",10,"<=",20]
}
]
}
""")
.tags(Map.of("Key1", "example Segment"))
.build());
}
}
Content copied to clipboard
resources:
example:
type: aws:evidently:Segment
properties:
name: example
pattern: |2
{
"Price": [
{
"numeric": [">",10,"<=",20]
}
]
}
tags:
Key1: example Segment
Content copied to clipboard
With Description
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.evidently.Segment("example", {
name: "example",
pattern: "{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}",
description: "example",
});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
example = aws.evidently.Segment("example",
name="example",
pattern="{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}",
description="example")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Evidently.Segment("example", new()
{
Name = "example",
Pattern = "{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}",
Description = "example",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := evidently.NewSegment(ctx, "example", &evidently.SegmentArgs{
Name: pulumi.String("example"),
Pattern: pulumi.String("{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}"),
Description: pulumi.String("example"),
})
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.aws.evidently.Segment;
import com.pulumi.aws.evidently.SegmentArgs;
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 example = new Segment("example", SegmentArgs.builder()
.name("example")
.pattern("{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}")
.description("example")
.build());
}
}
Content copied to clipboard
resources:
example:
type: aws:evidently:Segment
properties:
name: example
pattern: '{"Price":[{"numeric":[">",10,"<=",20]}]}'
description: example
Content copied to clipboard
Import
Using pulumi import
, import CloudWatch Evidently Segment using the arn
. For example:
$ pulumi import aws:evidently/segment:Segment example arn:aws:evidently:us-west-2:123456789012:segment/example
Content copied to clipboard
Constructors
Properties
Link copied to clipboard
Specifies the description of the segment.
Link copied to clipboard
The pattern to use for the segment. For more information about pattern syntax, see Segment rule pattern syntax.