Try AWS Native preview for resources not in the classic version.
aws.evidently.Segment
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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",
})
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
})
}
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 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",
})
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
})
}
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 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")
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
})
}
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 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
Create Segment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Segment(name: string, args: SegmentArgs, opts?: CustomResourceOptions);
@overload
def Segment(resource_name: str,
args: SegmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Segment(resource_name: str,
opts: Optional[ResourceOptions] = None,
pattern: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var segmentResource = new Aws.Evidently.Segment("segmentResource", new()
{
Pattern = "string",
Description = "string",
Name = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := evidently.NewSegment(ctx, "segmentResource", &evidently.SegmentArgs{
Pattern: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var segmentResource = new Segment("segmentResource", SegmentArgs.builder()
.pattern("string")
.description("string")
.name("string")
.tags(Map.of("string", "string"))
.build());
segment_resource = aws.evidently.Segment("segmentResource",
pattern="string",
description="string",
name="string",
tags={
"string": "string",
})
const segmentResource = new aws.evidently.Segment("segmentResource", {
pattern: "string",
description: "string",
name: "string",
tags: {
string: "string",
},
});
type: aws:evidently:Segment
properties:
description: string
name: string
pattern: string
tags:
string: string
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.
- 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.
- 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.
- 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.
- {[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.
- 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.
- 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.
- Created
Time string - 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 string
- The provider-assigned unique ID for this managed resource.
- Last
Updated stringTime - 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.
- 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.
- Created
Time string - 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 string
- The provider-assigned unique ID for this managed resource.
- Last
Updated stringTime - 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.
- 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.
- created
Time String - The date and time that the segment is created.
- experiment
Count 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.
- last
Updated StringTime - The date and time that this segment was most recently updated.
- launch
Count Integer - The number of launches that this segment is used in. This count includes all current launches, not just those that are currently running.
- 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.
- created
Time string - The date and time that the segment is created.
- experiment
Count 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.
- last
Updated stringTime - The date and time that this segment was most recently updated.
- launch
Count number - The number of launches that this segment is used in. This count includes all current launches, not just those that are currently running.
- {[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_ strtime - 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.
- 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.
- created
Time String - The date and time that the segment is created.
- experiment
Count 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.
- last
Updated StringTime - The date and time that this segment was most recently updated.
- launch
Count Number - The number of launches that this segment is used in. This count includes all current launches, not just those that are currently running.
- 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.
- Arn string
- The ARN of the segment.
- Created
Time string - The date and time that the segment is created.
- Description string
- 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 stringTime - 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 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.
- 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. - 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.
- Created
Time string - The date and time that the segment is created.
- Description string
- 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 stringTime - 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 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.
- 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. - 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.
- created
Time String - The date and time that the segment is created.
- description String
- Specifies the description of the segment.
- experiment
Count Integer - 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 StringTime - The date and time that this segment was most recently updated.
- launch
Count 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.
- 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. - 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.
- created
Time string - The date and time that the segment is created.
- description string
- Specifies the description of the segment.
- experiment
Count number - 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 stringTime - The date and time that this segment was most recently updated.
- launch
Count 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.
- {[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. - {[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_ strtime - 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.
- 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. - 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.
- created
Time String - The date and time that the segment is created.
- description String
- Specifies the description of the segment.
- experiment
Count Number - 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 StringTime - The date and time that this segment was most recently updated.
- launch
Count 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.
- 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. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.