Skip to content
v2.278.0

CfnFeatureProps Struct ​

Properties for defining a CfnFeature.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_evidently as evidently } from 'aws-cdk-lib';
const cfnFeatureProps: evidently.CfnFeatureProps = {
  name: 'name',
  project: 'project',
  variations: [{
    variationName: 'variationName',

    // the properties below are optional
    booleanValue: false,
    doubleValue: 123,
    longValue: 123,
    stringValue: 'stringValue',
  }],

  // the properties below are optional
  defaultVariation: 'defaultVariation',
  description: 'description',
  entityOverrides: [{
    entityId: 'entityId',
    variation: 'variation',
  }],
  evaluationStrategy: 'evaluationStrategy',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_evidently as evidently

cfn_feature_props = evidently.CfnFeatureProps(
    name="name",
    project="project",
    variations=[evidently.CfnFeature.VariationObjectProperty(
        variation_name="variationName",

        # the properties below are optional
        boolean_value=False,
        double_value=123,
        long_value=123,
        string_value="stringValue"
    )],

    # the properties below are optional
    default_variation="defaultVariation",
    description="description",
    entity_overrides=[evidently.CfnFeature.EntityOverrideProperty(
        entity_id="entityId",
        variation="variation"
    )],
    evaluation_strategy="evaluationStrategy",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.evidently.*;

CfnFeatureProps cfnFeatureProps = CfnFeatureProps.builder()
        .name("name")
        .project("project")
        .variations(List.of(VariationObjectProperty.builder()
                .variationName("variationName")

                // the properties below are optional
                .booleanValue(false)
                .doubleValue(123)
                .longValue(123)
                .stringValue("stringValue")
                .build()))

        // the properties below are optional
        .defaultVariation("defaultVariation")
        .description("description")
        .entityOverrides(List.of(EntityOverrideProperty.builder()
                .entityId("entityId")
                .variation("variation")
                .build()))
        .evaluationStrategy("evaluationStrategy")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Evidently;

var cfnFeatureProps = new CfnFeatureProps {
    Name = "name",
    Project = "project",
    Variations = new [] { new VariationObjectProperty {
        VariationName = "variationName",

        // the properties below are optional
        BooleanValue = false,
        DoubleValue = 123,
        LongValue = 123,
        StringValue = "stringValue"
    } },

    // the properties below are optional
    DefaultVariation = "defaultVariation",
    Description = "description",
    EntityOverrides = new [] { new EntityOverrideProperty {
        EntityId = "entityId",
        Variation = "variation"
    } },
    EvaluationStrategy = "evaluationStrategy",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnFeatureProps := &CfnFeatureProps{
	Name: jsii.String("name"),
	Project: jsii.String("project"),
	Variations: []interface{}{
		&VariationObjectProperty{
			VariationName: jsii.String("variationName"),

			// the properties below are optional
			BooleanValue: jsii.Boolean(false),
			DoubleValue: jsii.Number(123),
			LongValue: jsii.Number(123),
			StringValue: jsii.String("stringValue"),
		},
	},

	// the properties below are optional
	DefaultVariation: jsii.String("defaultVariation"),
	Description: jsii.String("description"),
	EntityOverrides: []interface{}{
		&EntityOverrideProperty{
			EntityId: jsii.String("entityId"),
			Variation: jsii.String("variation"),
		},
	},
	EvaluationStrategy: jsii.String("evaluationStrategy"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

defaultVariationoptionalstringdefault_variationoptionalstrdefaultVariationoptionalStringDefaultVariationoptionalstringDefaultVariationoptional*string #
The name of the variation to use as the default variation.
notes

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.

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
An optional description of the feature.
entityOverridesoptionalIResolvable | IResolvable | CfnFeature.EntityOverrideProperty[]entity_overridesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, EntityOverrideProperty]]]entityOverridesoptionalIResolvableEntityOverridesoptionalIResolvableEntityOverridesoptionalinterface{} #
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.

evaluationStrategyoptionalstringevaluation_strategyoptionalstrevaluationStrategyoptionalStringEvaluationStrategyoptionalstringEvaluationStrategyoptional*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.

namestringnamestrnameStringNamestringName*string required #
The name for the feature.

It can include up to 127 characters.

projectstring | IProjectRefprojecttyping.Union[str, IProjectRef]projectStringProjectstringProjectinterface{} required #
The name or ARN of the project that is to contain the new feature.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
Assigns one or more tags (key-value pairs) to the feature.
notes

Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

Tags don't have any semantic meaning to AWS and are interpreted strictly as strings of characters.

You can associate as many as 50 tags with a feature.

For more information, see Tagging AWS resources .

variationsIResolvable | IResolvable | CfnFeature.VariationObjectProperty[]variationstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, VariationObjectProperty]]]variationsIResolvableVariationsIResolvableVariationsinterface{} required #
An array of structures that contain the configuration of the feature's different variations.

Each VariationObject in the Variations array for a feature must have the same type of value ( BooleanValue , DoubleValue , LongValue or StringValue ).