Feature class

Provides a CloudWatch Evidently Feature resource.

> Warning: This resource is deprecated. Use AWS AppConfig feature flags instead.

Example Usage

Basic

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.evidently.Feature("example", {
    variations: [{
        value: {
            stringValue: "example",
        },
        name: "Variation1",
    }],
    name: "example",
    project: exampleAwsEvidentlyProject.name,
    description: "example description",
    tags: {
        Key1: "example Feature",
    },
});
import pulumi
import pulumi_aws as aws

example = aws.evidently.Feature("example",
    variations=[{
        "value": {
            "string_value": "example",
        },
        "name": "Variation1",
    }],
    name="example",
    project=example_aws_evidently_project["name"],
    description="example description",
    tags={
        "Key1": "example Feature",
    })
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.Evidently.Feature("example", new()
    {
        Variations = new[]
        {
            new Aws.Evidently.Inputs.FeatureVariationArgs
            {
                Value = new Aws.Evidently.Inputs.FeatureVariationValueArgs
                {
                    StringValue = "example",
                },
                Name = "Variation1",
            },
        },
        Name = "example",
        Project = exampleAwsEvidentlyProject.Name,
        Description = "example description",
        Tags =
        {
            { "Key1", "example Feature" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/evidently"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := evidently.NewFeature(ctx, "example", &evidently.FeatureArgs{
			Variations: evidently.FeatureVariationArray{
				&evidently.FeatureVariationArgs{
					Value: &evidently.FeatureVariationValueArgs{
						StringValue: pulumi.String("example"),
					},
					Name: pulumi.String("Variation1"),
				},
			},
			Name:        pulumi.String("example"),
			Project:     pulumi.Any(exampleAwsEvidentlyProject.Name),
			Description: pulumi.String("example description"),
			Tags: pulumi.StringMap{
				"Key1": pulumi.String("example Feature"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_evidently_feature" "example" {
  variations {
    value = {
      string_value = "example"
    }
    name = "Variation1"
  }
  name        = "example"
  project     = exampleAwsEvidentlyProject.name
  description = "example description"
  tags = {
    "Key1" = "example Feature"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.evidently.Feature;
import com.pulumi.aws.evidently.FeatureArgs;
import com.pulumi.aws.evidently.inputs.FeatureVariationArgs;
import com.pulumi.aws.evidently.inputs.FeatureVariationValueArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 Feature("example", FeatureArgs.builder()
            .variations(FeatureVariationArgs.builder()
                .value(FeatureVariationValueArgs.builder()
                    .stringValue("example")
                    .build())
                .name("Variation1")
                .build())
            .name("example")
            .project(exampleAwsEvidentlyProject.name())
            .description("example description")
            .tags(Map.of("Key1", "example Feature"))
            .build());

    }
}
resources:
  example:
    type: aws:evidently:Feature
    properties:
      variations:
        - value:
            stringValue: example
          name: Variation1
      name: example
      project: ${exampleAwsEvidentlyProject.name}
      description: example description
      tags:
        Key1: example Feature

With default variation

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.evidently.Feature("example", {
    variations: [
        {
            value: {
                stringValue: "exampleval1",
            },
            name: "Variation1",
        },
        {
            value: {
                stringValue: "exampleval2",
            },
            name: "Variation2",
        },
    ],
    name: "example",
    project: exampleAwsEvidentlyProject.name,
    defaultVariation: "Variation2",
});
import pulumi
import pulumi_aws as aws

example = aws.evidently.Feature("example",
    variations=[
        {
            "value": {
                "string_value": "exampleval1",
            },
            "name": "Variation1",
        },
        {
            "value": {
                "string_value": "exampleval2",
            },
            "name": "Variation2",
        },
    ],
    name="example",
    project=example_aws_evidently_project["name"],
    default_variation="Variation2")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.Evidently.Feature("example", new()
    {
        Variations = new[]
        {
            new Aws.Evidently.Inputs.FeatureVariationArgs
            {
                Value = new Aws.Evidently.Inputs.FeatureVariationValueArgs
                {
                    StringValue = "exampleval1",
                },
                Name = "Variation1",
            },
            new Aws.Evidently.Inputs.FeatureVariationArgs
            {
                Value = new Aws.Evidently.Inputs.FeatureVariationValueArgs
                {
                    StringValue = "exampleval2",
                },
                Name = "Variation2",
            },
        },
        Name = "example",
        Project = exampleAwsEvidentlyProject.Name,
        DefaultVariation = "Variation2",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/evidently"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := evidently.NewFeature(ctx, "example", &evidently.FeatureArgs{
			Variations: evidently.FeatureVariationArray{
				&evidently.FeatureVariationArgs{
					Value: &evidently.FeatureVariationValueArgs{
						StringValue: pulumi.String("exampleval1"),
					},
					Name: pulumi.String("Variation1"),
				},
				&evidently.FeatureVariationArgs{
					Value: &evidently.FeatureVariationValueArgs{
						StringValue: pulumi.String("exampleval2"),
					},
					Name: pulumi.String("Variation2"),
				},
			},
			Name:             pulumi.String("example"),
			Project:          pulumi.Any(exampleAwsEvidentlyProject.Name),
			DefaultVariation: pulumi.String("Variation2"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_evidently_feature" "example" {
  variations {
    value = {
      string_value = "exampleval1"
    }
    name = "Variation1"
  }
  variations {
    value = {
      string_value = "exampleval2"
    }
    name = "Variation2"
  }
  name              = "example"
  project           = exampleAwsEvidentlyProject.name
  default_variation = "Variation2"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.evidently.Feature;
import com.pulumi.aws.evidently.FeatureArgs;
import com.pulumi.aws.evidently.inputs.FeatureVariationArgs;
import com.pulumi.aws.evidently.inputs.FeatureVariationValueArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 Feature("example", FeatureArgs.builder()
            .variations(
                FeatureVariationArgs.builder()
                    .value(FeatureVariationValueArgs.builder()
                        .stringValue("exampleval1")
                        .build())
                    .name("Variation1")
                    .build(),
                FeatureVariationArgs.builder()
                    .value(FeatureVariationValueArgs.builder()
                        .stringValue("exampleval2")
                        .build())
                    .name("Variation2")
                    .build())
            .name("example")
            .project(exampleAwsEvidentlyProject.name())
            .defaultVariation("Variation2")
            .build());

    }
}
resources:
  example:
    type: aws:evidently:Feature
    properties:
      variations:
        - value:
            stringValue: exampleval1
          name: Variation1
        - value:
            stringValue: exampleval2
          name: Variation2
      name: example
      project: ${exampleAwsEvidentlyProject.name}
      defaultVariation: Variation2

With entity overrides

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.evidently.Feature("example", {
    variations: [
        {
            value: {
                stringValue: "exampleval1",
            },
            name: "Variation1",
        },
        {
            value: {
                stringValue: "exampleval2",
            },
            name: "Variation2",
        },
    ],
    name: "example",
    project: exampleAwsEvidentlyProject.name,
    entityOverrides: {
        test1: "Variation1",
    },
});
import pulumi
import pulumi_aws as aws

example = aws.evidently.Feature("example",
    variations=[
        {
            "value": {
                "string_value": "exampleval1",
            },
            "name": "Variation1",
        },
        {
            "value": {
                "string_value": "exampleval2",
            },
            "name": "Variation2",
        },
    ],
    name="example",
    project=example_aws_evidently_project["name"],
    entity_overrides={
        "test1": "Variation1",
    })
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.Evidently.Feature("example", new()
    {
        Variations = new[]
        {
            new Aws.Evidently.Inputs.FeatureVariationArgs
            {
                Value = new Aws.Evidently.Inputs.FeatureVariationValueArgs
                {
                    StringValue = "exampleval1",
                },
                Name = "Variation1",
            },
            new Aws.Evidently.Inputs.FeatureVariationArgs
            {
                Value = new Aws.Evidently.Inputs.FeatureVariationValueArgs
                {
                    StringValue = "exampleval2",
                },
                Name = "Variation2",
            },
        },
        Name = "example",
        Project = exampleAwsEvidentlyProject.Name,
        EntityOverrides =
        {
            { "test1", "Variation1" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/evidently"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := evidently.NewFeature(ctx, "example", &evidently.FeatureArgs{
			Variations: evidently.FeatureVariationArray{
				&evidently.FeatureVariationArgs{
					Value: &evidently.FeatureVariationValueArgs{
						StringValue: pulumi.String("exampleval1"),
					},
					Name: pulumi.String("Variation1"),
				},
				&evidently.FeatureVariationArgs{
					Value: &evidently.FeatureVariationValueArgs{
						StringValue: pulumi.String("exampleval2"),
					},
					Name: pulumi.String("Variation2"),
				},
			},
			Name:    pulumi.String("example"),
			Project: pulumi.Any(exampleAwsEvidentlyProject.Name),
			EntityOverrides: pulumi.StringMap{
				"test1": pulumi.String("Variation1"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_evidently_feature" "example" {
  variations {
    value = {
      string_value = "exampleval1"
    }
    name = "Variation1"
  }
  variations {
    value = {
      string_value = "exampleval2"
    }
    name = "Variation2"
  }
  name    = "example"
  project = exampleAwsEvidentlyProject.name
  entity_overrides = {
    "test1" = "Variation1"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.evidently.Feature;
import com.pulumi.aws.evidently.FeatureArgs;
import com.pulumi.aws.evidently.inputs.FeatureVariationArgs;
import com.pulumi.aws.evidently.inputs.FeatureVariationValueArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 Feature("example", FeatureArgs.builder()
            .variations(
                FeatureVariationArgs.builder()
                    .value(FeatureVariationValueArgs.builder()
                        .stringValue("exampleval1")
                        .build())
                    .name("Variation1")
                    .build(),
                FeatureVariationArgs.builder()
                    .value(FeatureVariationValueArgs.builder()
                        .stringValue("exampleval2")
                        .build())
                    .name("Variation2")
                    .build())
            .name("example")
            .project(exampleAwsEvidentlyProject.name())
            .entityOverrides(Map.of("test1", "Variation1"))
            .build());

    }
}
resources:
  example:
    type: aws:evidently:Feature
    properties:
      variations:
        - value:
            stringValue: exampleval1
          name: Variation1
        - value:
            stringValue: exampleval2
          name: Variation2
      name: example
      project: ${exampleAwsEvidentlyProject.name}
      entityOverrides:
        test1: Variation1

With evaluation strategy

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.evidently.Feature("example", {
    variations: [{
        value: {
            stringValue: "exampleval1",
        },
        name: "Variation1",
    }],
    name: "example",
    project: exampleAwsEvidentlyProject.name,
    evaluationStrategy: "ALL_RULES",
    entityOverrides: {
        test1: "Variation1",
    },
});
import pulumi
import pulumi_aws as aws

example = aws.evidently.Feature("example",
    variations=[{
        "value": {
            "string_value": "exampleval1",
        },
        "name": "Variation1",
    }],
    name="example",
    project=example_aws_evidently_project["name"],
    evaluation_strategy="ALL_RULES",
    entity_overrides={
        "test1": "Variation1",
    })
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.Evidently.Feature("example", new()
    {
        Variations = new[]
        {
            new Aws.Evidently.Inputs.FeatureVariationArgs
            {
                Value = new Aws.Evidently.Inputs.FeatureVariationValueArgs
                {
                    StringValue = "exampleval1",
                },
                Name = "Variation1",
            },
        },
        Name = "example",
        Project = exampleAwsEvidentlyProject.Name,
        EvaluationStrategy = "ALL_RULES",
        EntityOverrides =
        {
            { "test1", "Variation1" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/evidently"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := evidently.NewFeature(ctx, "example", &evidently.FeatureArgs{
			Variations: evidently.FeatureVariationArray{
				&evidently.FeatureVariationArgs{
					Value: &evidently.FeatureVariationValueArgs{
						StringValue: pulumi.String("exampleval1"),
					},
					Name: pulumi.String("Variation1"),
				},
			},
			Name:               pulumi.String("example"),
			Project:            pulumi.Any(exampleAwsEvidentlyProject.Name),
			EvaluationStrategy: pulumi.String("ALL_RULES"),
			EntityOverrides: pulumi.StringMap{
				"test1": pulumi.String("Variation1"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_evidently_feature" "example" {
  variations {
    value = {
      string_value = "exampleval1"
    }
    name = "Variation1"
  }
  name                = "example"
  project             = exampleAwsEvidentlyProject.name
  evaluation_strategy = "ALL_RULES"
  entity_overrides = {
    "test1" = "Variation1"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.evidently.Feature;
import com.pulumi.aws.evidently.FeatureArgs;
import com.pulumi.aws.evidently.inputs.FeatureVariationArgs;
import com.pulumi.aws.evidently.inputs.FeatureVariationValueArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 Feature("example", FeatureArgs.builder()
            .variations(FeatureVariationArgs.builder()
                .value(FeatureVariationValueArgs.builder()
                    .stringValue("exampleval1")
                    .build())
                .name("Variation1")
                .build())
            .name("example")
            .project(exampleAwsEvidentlyProject.name())
            .evaluationStrategy("ALL_RULES")
            .entityOverrides(Map.of("test1", "Variation1"))
            .build());

    }
}
resources:
  example:
    type: aws:evidently:Feature
    properties:
      variations:
        - value:
            stringValue: exampleval1
          name: Variation1
      name: example
      project: ${exampleAwsEvidentlyProject.name}
      evaluationStrategy: ALL_RULES
      entityOverrides:
        test1: Variation1

Import

Using pulumi import, import CloudWatch Evidently Feature using the feature name and name or arn of the hosting CloudWatch Evidently Project separated by a :. For example:

$ pulumi import aws:evidently/feature:Feature example exampleFeatureName:arn:aws:evidently:us-east-1:123456789012:project/example

Constructors

Feature(String name, {FeatureArgs? args, CustomResourceOptions? options})
Creates a new Feature. name The Pulumi resource name. args Arguments used to configure this Feature. The set of arguments for Feature. options Resource options controlling this resource's behavior.
Feature.reference(String urn)
Creates a typed reference to an existing Feature resource.

Properties

arn ↔ Output<String>
The ARN of the feature.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
createdTime ↔ Output<String>
The date and time that the feature is created.
latefinal
defaultVariation ↔ Output<String>
The name of the variation to use as the default variation. The default variation is served to users who are not allocated to any ongoing launches or experiments of this feature. This variation must also be listed in the variations structure. If you omit defaultVariation, the first variation listed in the variations structure is used as the default variation.
latefinal
description ↔ Output<String?>
Specifies the description of the feature.
latefinal
entityOverrides ↔ Output<Map<String, String>?>
Specify users that should always be served a specific variation of a feature. Each user is specified by a key-value pair . For each key, specify a user by entering their user ID, account ID, or some other identifier. For the value, specify the name of the variation that they are to be served.
latefinal
evaluationRules ↔ Output<List<FeatureEvaluationRule>>
One or more blocks that define the evaluation rules for the feature. Detailed below
latefinal
evaluationStrategy ↔ Output<String>
Specify ALL_RULES to activate the traffic allocation specified by any ongoing launches or experiments. Specify DEFAULT_VARIATION to serve the default variation to all users instead.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
lastUpdatedTime ↔ Output<String>
The date and time that the feature was most recently updated.
latefinal
name ↔ Output<String>
The name for the new feature. Minimum length of 1. Maximum length of 127.
latefinal
project ↔ Output<String>
The name or ARN of the project that is to contain the new feature.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status ↔ Output<String>
The current state of the feature. Valid values are AVAILABLE and UPDATING.
latefinal
tags ↔ Output<Map<String, String>?>
Tags to apply to the feature. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited
valueType ↔ Output<String>
Defines the type of value used to define the different feature variations. Valid Values: STRING, LONG, DOUBLE, BOOLEAN.
latefinal
variations ↔ Output<List<FeatureVariation>>
One or more blocks that contain the configuration of the feature's different variations. Detailed below
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {FeatureState? state, CustomResourceOptions? options}) → Feature
Gets an existing Feature resource's state with the given name and id.