SegmentArgs

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",
},
});
import pulumi
import pulumi_aws as aws
example = aws.evidently.Segment("example",
name="example",
pattern="{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}",
tags={
"Key1": "example Segment",
})
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" },
},
});
});
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
})
}
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());
}
}
resources:
example:
type: aws:evidently:Segment
properties:
name: example
pattern: '{"Price":[{"numeric":[">",10,"<=",20]}]}'
tags:
Key1: example Segment

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",
},
});
import pulumi
import pulumi_aws as aws
example = aws.evidently.Segment("example",
name="example",
pattern=""" {
"Price": [
{
"numeric": [">",10,"<=",20]
}
]
}
""",
tags={
"Key1": "example Segment",
})
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" },
},
});
});
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
})
}
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());
}
}
resources:
example:
type: aws:evidently:Segment
properties:
name: example
pattern: |2
{
"Price": [
{
"numeric": [">",10,"<=",20]
}
]
}
tags:
Key1: example Segment

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",
});
import pulumi
import pulumi_aws as aws
example = aws.evidently.Segment("example",
name="example",
pattern="{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}",
description="example")
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",
});
});
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
})
}
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());
}
}
resources:
example:
type: aws:evidently:Segment
properties:
name: example
pattern: '{"Price":[{"numeric":[">",10,"<=",20]}]}'
description: example

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

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, name: Output<String>? = null, pattern: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val description: Output<String>? = null

Specifies the description of the segment.

Link copied to clipboard
val name: Output<String>? = null

A name for the segment.

Link copied to clipboard
val pattern: Output<String>? = null

The pattern to use for the segment. For more information about pattern syntax, see Segment rule pattern syntax.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Tags to apply to the segment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Functions

Link copied to clipboard
open override fun toJava(): SegmentArgs