CfnFeaturePropsMixin
- class aws_cdk.mixins_preview.aws_evidently.mixins.CfnFeaturePropsMixin(props, *, strategy=None)
Bases:
MixinCreates or updates an Evidently feature that you want to launch or test.
You can define up to five variations of a feature, and use these variations in your launches and experiments. A feature must be created in a project. For information about creating a project, see CreateProject .
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-feature.html
- CloudformationResource:
AWS::Evidently::Feature
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_evidently import mixins as evidently_mixins cfn_feature_props_mixin = evidently_mixins.CfnFeaturePropsMixin(evidently_mixins.CfnFeatureMixinProps( default_variation="defaultVariation", description="description", entity_overrides=[evidently_mixins.CfnFeaturePropsMixin.EntityOverrideProperty( entity_id="entityId", variation="variation" )], evaluation_strategy="evaluationStrategy", name="name", project="project", tags=[CfnTag( key="key", value="value" )], variations=[evidently_mixins.CfnFeaturePropsMixin.VariationObjectProperty( boolean_value=False, double_value=123, long_value=123, string_value="stringValue", variation_name="variationName" )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Evidently::Feature.- Parameters:
props (
Union[CfnFeatureMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['defaultVariation', 'description', 'entityOverrides', 'evaluationStrategy', 'name', 'project', 'tags', 'variations']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
EntityOverrideProperty
- class CfnFeaturePropsMixin.EntityOverrideProperty(*, entity_id=None, variation=None)
Bases:
objectA set of key-value pairs that specify users who should always be served a specific variation of a feature.
Each key specifies a user using their user ID, account ID, or some other identifier. The value specifies the name of the variation that the user is to be served.
- Parameters:
entity_id (
Optional[str]) – The entity ID to be served the variation specified inVariation.variation (
Optional[str]) – The name of the variation to serve to the user session that matches theEntityId.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_evidently import mixins as evidently_mixins entity_override_property = evidently_mixins.CfnFeaturePropsMixin.EntityOverrideProperty( entity_id="entityId", variation="variation" )
Attributes
- entity_id
The entity ID to be served the variation specified in
Variation.
- variation
The name of the variation to serve to the user session that matches the
EntityId.
VariationObjectProperty
- class CfnFeaturePropsMixin.VariationObjectProperty(*, boolean_value=None, double_value=None, long_value=None, string_value=None, variation_name=None)
Bases:
objectThis structure contains the name and variation value of one variation of a feature.
It can contain only one of the following parameters:
BooleanValue,DoubleValue,LongValueorStringValue.- Parameters:
boolean_value (
Union[bool,IResolvable,None]) – The value assigned to this variation, if the variation type is boolean.double_value (
Union[int,float,None]) – The value assigned to this variation, if the variation type is a double.long_value (
Union[int,float,None]) – The value assigned to this variation, if the variation type is a long.string_value (
Optional[str]) – The value assigned to this variation, if the variation type is a string.variation_name (
Optional[str]) – A name for the variation. It can include up to 127 characters.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_evidently import mixins as evidently_mixins variation_object_property = evidently_mixins.CfnFeaturePropsMixin.VariationObjectProperty( boolean_value=False, double_value=123, long_value=123, string_value="stringValue", variation_name="variationName" )
Attributes
- boolean_value
The value assigned to this variation, if the variation type is boolean.
- double_value
The value assigned to this variation, if the variation type is a double.
- long_value
The value assigned to this variation, if the variation type is a long.
- string_value
The value assigned to this variation, if the variation type is a string.
- variation_name
A name for the variation.
It can include up to 127 characters.