Package com.pulumi.aws.evidently
Class Feature
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.evidently.Feature
-
public class Feature extends com.pulumi.resources.CustomResourceProvides a CloudWatch Evidently Feature resource. > **Warning:** This resource is deprecated. Use [AWS AppConfig feature flags](https://aws.amazon.com/blogs/mt/using-aws-appconfig-feature-flags/) instead. ## Example Usage ### Basic
### With default variationpackage 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()); } }
### With entity overridespackage 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()); } }
### With evaluation strategypackage 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()); } }
## 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: ```sh $ pulumi import aws:evidently/feature:Feature example exampleFeatureName:arn:aws:evidently:us-east-1:123456789012:project/example ```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()); } }
-
-
Constructor Summary
Constructors Constructor Description Feature(java.lang.String name)Feature(java.lang.String name, FeatureArgs args)Feature(java.lang.String name, FeatureArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.lang.String>createdTime()com.pulumi.core.Output<java.lang.String>defaultVariation()com.pulumi.core.Output<java.util.Optional<java.lang.String>>description()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>entityOverrides()com.pulumi.core.Output<java.util.List<FeatureEvaluationRule>>evaluationRules()com.pulumi.core.Output<java.lang.String>evaluationStrategy()static Featureget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, FeatureState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>lastUpdatedTime()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>project()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>status()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()com.pulumi.core.Output<java.lang.String>valueType()com.pulumi.core.Output<java.util.List<FeatureVariation>>variations()
-
-
-
Constructor Detail
-
Feature
public Feature(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Feature
public Feature(java.lang.String name, FeatureArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Feature
public Feature(java.lang.String name, FeatureArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- The ARN of the feature.
-
createdTime
public com.pulumi.core.Output<java.lang.String> createdTime()
- Returns:
- The date and time that the feature is created.
-
defaultVariation
public com.pulumi.core.Output<java.lang.String> defaultVariation()
- Returns:
- 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.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- Specifies the description of the feature.
-
entityOverrides
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> entityOverrides()
- Returns:
- 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.
-
evaluationRules
public com.pulumi.core.Output<java.util.List<FeatureEvaluationRule>> evaluationRules()
- Returns:
- One or more blocks that define the evaluation rules for the feature. Detailed below
-
evaluationStrategy
public com.pulumi.core.Output<java.lang.String> evaluationStrategy()
- Returns:
- 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.
-
lastUpdatedTime
public com.pulumi.core.Output<java.lang.String> lastUpdatedTime()
- Returns:
- The date and time that the feature was most recently updated.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The name for the new feature. Minimum length of `1`. Maximum length of `127`.
-
project
public com.pulumi.core.Output<java.lang.String> project()
- Returns:
- The name or ARN of the project that is to contain the new feature.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
status
public com.pulumi.core.Output<java.lang.String> status()
- Returns:
- The current state of the feature. Valid values are `AVAILABLE` and `UPDATING`.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- 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.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
valueType
public com.pulumi.core.Output<java.lang.String> valueType()
- Returns:
- Defines the type of value used to define the different feature variations. Valid Values: `STRING`, `LONG`, `DOUBLE`, `BOOLEAN`.
-
variations
public com.pulumi.core.Output<java.util.List<FeatureVariation>> variations()
- Returns:
- One or more blocks that contain the configuration of the feature's different variations. Detailed below
-
get
public static Feature get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable FeatureState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-