com.pulumi.aws.evidently.kotlin.SegmentArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.evidently.kotlin
import com.pulumi.aws.evidently.SegmentArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides a CloudWatch Evidently Segment resource.
* ## Example Usage
* ### Basic
*
* ```typescript
* 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",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.evidently.Segment("example",
* name="example",
* pattern="{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}",
* tags={
* "Key1": "example Segment",
* })
* ```
* ```csharp
* 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" },
* },
* });
* });
* ```
* ```go
* 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
* })
* }
* ```
* ```java
* 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());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:evidently:Segment
* properties:
* name: example
* pattern: '{"Price":[{"numeric":[">",10,"<=",20]}]}'
* tags:
* Key1: example Segment
* ```
*
* ### With JSON object in pattern
*
* ```typescript
* 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",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.evidently.Segment("example",
* name="example",
* pattern=""" {
* "Price": [
* {
* "numeric": [">",10,"<=",20]
* }
* ]
* }
* """,
* tags={
* "Key1": "example Segment",
* })
* ```
* ```csharp
* 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" },
* },
* });
* });
* ```
* ```go
* 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
* })
* }
* ```
* ```java
* 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());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:evidently:Segment
* properties:
* name: example
* pattern: |2
* {
* "Price": [
* {
* "numeric": [">",10,"<=",20]
* }
* ]
* }
* tags:
* Key1: example Segment
* ```
*
* ### With Description
*
* ```typescript
* 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",
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.evidently.Segment("example",
* name="example",
* pattern="{\"Price\":[{\"numeric\":[\">\",10,\"<=\",20]}]}",
* description="example")
* ```
* ```csharp
* 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",
* });
* });
* ```
* ```go
* 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
* })
* }
* ```
* ```java
* 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());
* }
* }
* ```
* ```yaml
* 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:
* ```sh
* $ pulumi import aws:evidently/segment:Segment example arn:aws:evidently:us-west-2:123456789012:segment/example
* ```
* @property description Specifies the description of the segment.
* @property name A name for the segment.
* @property pattern The pattern to use for the segment. For more information about pattern syntax, see [Segment rule pattern syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-segments.html#CloudWatch-Evidently-segments-syntax.html).
* @property tags 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.
*/
public data class SegmentArgs(
public val description: Output? = null,
public val name: Output? = null,
public val pattern: Output? = null,
public val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy