aws logo
AWS Classic v5.41.0, May 15 23

aws.evidently.Segment

Explore with Pulumi AI

Provides a CloudWatch Evidently Segment resource.

Example Usage

Basic

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()
    {
        Pattern = "{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}",
        Tags = 
        {
            { "Key1", "example Segment" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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{
			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()        
            .pattern("{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}")
            .tags(Map.of("Key1", "example Segment"))
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.evidently.Segment("example",
    pattern="{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}",
    tags={
        "Key1": "example Segment",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.evidently.Segment("example", {
    pattern: "{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}",
    tags: {
        Key1: "example Segment",
    },
});
resources:
  example:
    type: aws:evidently:Segment
    properties:
      pattern: '{"Price":[{"numeric":[">",10,"<=",20]}]}'
      tags:
        Key1: example Segment

With JSON object in pattern

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()
    {
        Pattern = @"  {
    ""Price"": [
      {
        ""numeric"": ["">"",10,""<="",20]
      }
    ]
  }
  
",
        Tags = 
        {
            { "Key1", "example Segment" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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{
			Pattern: pulumi.String("  {\n    \"Price\": [\n      {\n        \"numeric\": [\">\",10,\"<=\",20]\n      }\n    ]\n  }\n  \n"),
			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()        
            .pattern("""
  {
    "Price": [
      {
        "numeric": [">",10,"<=",20]
      }
    ]
  }
  
            """)
            .tags(Map.of("Key1", "example Segment"))
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.evidently.Segment("example",
    pattern="""  {
    "Price": [
      {
        "numeric": [">",10,"<=",20]
      }
    ]
  }
  
""",
    tags={
        "Key1": "example Segment",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.evidently.Segment("example", {
    pattern: `  {
    "Price": [
      {
        "numeric": [">",10,"<=",20]
      }
    ]
  }
  
`,
    tags: {
        Key1: "example Segment",
    },
});
resources:
  example:
    type: aws:evidently:Segment
    properties:
      pattern: "  {\n    \"Price\": [\n      {\n        \"numeric\": [\">\",10,\"<=\",20]\n      }\n    ]\n  }\n  \n"
      tags:
        Key1: example Segment

With Description

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()
    {
        Description = "example",
        Pattern = "{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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{
			Description: pulumi.String("example"),
			Pattern:     pulumi.String("{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}"),
		})
		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()        
            .description("example")
            .pattern("{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.evidently.Segment("example",
    description="example",
    pattern="{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.evidently.Segment("example", {
    description: "example",
    pattern: "{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}",
});
resources:
  example:
    type: aws:evidently:Segment
    properties:
      description: example
      pattern: '{"Price":[{"numeric":[">",10,"<=",20]}]}'

Create Segment Resource

new Segment(name: string, args: SegmentArgs, opts?: CustomResourceOptions);
@overload
def Segment(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            pattern: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None)
@overload
def Segment(resource_name: str,
            args: SegmentArgs,
            opts: Optional[ResourceOptions] = None)
func NewSegment(ctx *Context, name string, args SegmentArgs, opts ...ResourceOption) (*Segment, error)
public Segment(string name, SegmentArgs args, CustomResourceOptions? opts = null)
public Segment(String name, SegmentArgs args)
public Segment(String name, SegmentArgs args, CustomResourceOptions options)
type: aws:evidently:Segment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args SegmentArgs
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 SegmentArgs
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 SegmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SegmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args SegmentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Segment 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 Segment resource accepts the following input properties:

Pattern string

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

Description string

Specifies the description of the segment.

Name string

A name for the segment.

Tags Dictionary<string, string>

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.

Pattern string

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

Description string

Specifies the description of the segment.

Name string

A name for the segment.

Tags map[string]string

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.

pattern String

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

description String

Specifies the description of the segment.

name String

A name for the segment.

tags Map<String,String>

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.

pattern string

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

description string

Specifies the description of the segment.

name string

A name for the segment.

tags {[key: string]: string}

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.

pattern str

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

description str

Specifies the description of the segment.

name str

A name for the segment.

tags Mapping[str, str]

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.

pattern String

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

description String

Specifies the description of the segment.

name String

A name for the segment.

tags Map<String>

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.

Outputs

All input properties are implicitly available as output properties. Additionally, the Segment resource produces the following output properties:

Arn string

The ARN of the segment.

CreatedTime string

The date and time that the segment is created.

ExperimentCount int

The number of experiments that this segment is used in. This count includes all current experiments, not just those that are currently running.

Id string

The provider-assigned unique ID for this managed resource.

LastUpdatedTime string

The date and time that this segment was most recently updated.

LaunchCount int

The number of launches that this segment is used in. This count includes all current launches, not just those that are currently running.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Arn string

The ARN of the segment.

CreatedTime string

The date and time that the segment is created.

ExperimentCount int

The number of experiments that this segment is used in. This count includes all current experiments, not just those that are currently running.

Id string

The provider-assigned unique ID for this managed resource.

LastUpdatedTime string

The date and time that this segment was most recently updated.

LaunchCount int

The number of launches that this segment is used in. This count includes all current launches, not just those that are currently running.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

The ARN of the segment.

createdTime String

The date and time that the segment is created.

experimentCount Integer

The number of experiments that this segment is used in. This count includes all current experiments, not just those that are currently running.

id String

The provider-assigned unique ID for this managed resource.

lastUpdatedTime String

The date and time that this segment was most recently updated.

launchCount Integer

The number of launches that this segment is used in. This count includes all current launches, not just those that are currently running.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn string

The ARN of the segment.

createdTime string

The date and time that the segment is created.

experimentCount number

The number of experiments that this segment is used in. This count includes all current experiments, not just those that are currently running.

id string

The provider-assigned unique ID for this managed resource.

lastUpdatedTime string

The date and time that this segment was most recently updated.

launchCount number

The number of launches that this segment is used in. This count includes all current launches, not just those that are currently running.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn str

The ARN of the segment.

created_time str

The date and time that the segment is created.

experiment_count int

The number of experiments that this segment is used in. This count includes all current experiments, not just those that are currently running.

id str

The provider-assigned unique ID for this managed resource.

last_updated_time str

The date and time that this segment was most recently updated.

launch_count int

The number of launches that this segment is used in. This count includes all current launches, not just those that are currently running.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

The ARN of the segment.

createdTime String

The date and time that the segment is created.

experimentCount Number

The number of experiments that this segment is used in. This count includes all current experiments, not just those that are currently running.

id String

The provider-assigned unique ID for this managed resource.

lastUpdatedTime String

The date and time that this segment was most recently updated.

launchCount Number

The number of launches that this segment is used in. This count includes all current launches, not just those that are currently running.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Look up Existing Segment Resource

Get an existing Segment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: SegmentState, opts?: CustomResourceOptions): Segment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        created_time: Optional[str] = None,
        description: Optional[str] = None,
        experiment_count: Optional[int] = None,
        last_updated_time: Optional[str] = None,
        launch_count: Optional[int] = None,
        name: Optional[str] = None,
        pattern: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> Segment
func GetSegment(ctx *Context, name string, id IDInput, state *SegmentState, opts ...ResourceOption) (*Segment, error)
public static Segment Get(string name, Input<string> id, SegmentState? state, CustomResourceOptions? opts = null)
public static Segment get(String name, Output<String> id, SegmentState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Arn string

The ARN of the segment.

CreatedTime string

The date and time that the segment is created.

Description string

Specifies the description of the segment.

ExperimentCount int

The number of experiments that this segment is used in. This count includes all current experiments, not just those that are currently running.

LastUpdatedTime string

The date and time that this segment was most recently updated.

LaunchCount int

The number of launches that this segment is used in. This count includes all current launches, not just those that are currently running.

Name string

A name for the segment.

Pattern string

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

Tags Dictionary<string, string>

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.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Arn string

The ARN of the segment.

CreatedTime string

The date and time that the segment is created.

Description string

Specifies the description of the segment.

ExperimentCount int

The number of experiments that this segment is used in. This count includes all current experiments, not just those that are currently running.

LastUpdatedTime string

The date and time that this segment was most recently updated.

LaunchCount int

The number of launches that this segment is used in. This count includes all current launches, not just those that are currently running.

Name string

A name for the segment.

Pattern string

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

Tags map[string]string

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.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

The ARN of the segment.

createdTime String

The date and time that the segment is created.

description String

Specifies the description of the segment.

experimentCount Integer

The number of experiments that this segment is used in. This count includes all current experiments, not just those that are currently running.

lastUpdatedTime String

The date and time that this segment was most recently updated.

launchCount Integer

The number of launches that this segment is used in. This count includes all current launches, not just those that are currently running.

name String

A name for the segment.

pattern String

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

tags Map<String,String>

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.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn string

The ARN of the segment.

createdTime string

The date and time that the segment is created.

description string

Specifies the description of the segment.

experimentCount number

The number of experiments that this segment is used in. This count includes all current experiments, not just those that are currently running.

lastUpdatedTime string

The date and time that this segment was most recently updated.

launchCount number

The number of launches that this segment is used in. This count includes all current launches, not just those that are currently running.

name string

A name for the segment.

pattern string

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

tags {[key: string]: string}

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.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn str

The ARN of the segment.

created_time str

The date and time that the segment is created.

description str

Specifies the description of the segment.

experiment_count int

The number of experiments that this segment is used in. This count includes all current experiments, not just those that are currently running.

last_updated_time str

The date and time that this segment was most recently updated.

launch_count int

The number of launches that this segment is used in. This count includes all current launches, not just those that are currently running.

name str

A name for the segment.

pattern str

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

tags Mapping[str, str]

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.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

The ARN of the segment.

createdTime String

The date and time that the segment is created.

description String

Specifies the description of the segment.

experimentCount Number

The number of experiments that this segment is used in. This count includes all current experiments, not just those that are currently running.

lastUpdatedTime String

The date and time that this segment was most recently updated.

launchCount Number

The number of launches that this segment is used in. This count includes all current launches, not just those that are currently running.

name String

A name for the segment.

pattern String

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

tags Map<String>

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.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Import

CloudWatch Evidently Segment can be imported using the arn, e.g.,

 $ pulumi import aws:evidently/segment:Segment example arn:aws:evidently:us-west-2:123456789012:segment/example

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.