Class: AWSCDK::Evidently::CfnFeature::EntityOverrideProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
evidently/cfn_feature.rb

Overview

A 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.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(entity_id: nil, variation: nil) ⇒ EntityOverrideProperty

Returns a new instance of EntityOverrideProperty.

Parameters:

  • entity_id (String, nil) (defaults to: nil)

    The entity ID to be served the variation specified in Variation .

  • variation (String, nil) (defaults to: nil)

    The name of the variation to serve to the user session that matches the EntityId .



615
616
617
618
619
620
# File 'evidently/cfn_feature.rb', line 615

def initialize(entity_id: nil, variation: nil)
  @entity_id = entity_id
  Jsii::Type.check_type(@entity_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "entityId") unless @entity_id.nil?
  @variation = variation
  Jsii::Type.check_type(@variation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "variation") unless @variation.nil?
end

Instance Attribute Details

#entity_idString? (readonly)

The entity ID to be served the variation specified in Variation .



626
627
628
# File 'evidently/cfn_feature.rb', line 626

def entity_id
  @entity_id
end

#variationString? (readonly)

The name of the variation to serve to the user session that matches the EntityId .



631
632
633
# File 'evidently/cfn_feature.rb', line 631

def variation
  @variation
end

Class Method Details

.jsii_propertiesObject



633
634
635
636
637
638
# File 'evidently/cfn_feature.rb', line 633

def self.jsii_properties
  {
    :entity_id => "entityId",
    :variation => "variation",
  }
end

Instance Method Details

#to_jsiiObject



640
641
642
643
644
645
646
647
# File 'evidently/cfn_feature.rb', line 640

def to_jsii
  result = {}
  result.merge!({
    "entityId" => @entity_id,
    "variation" => @variation,
  })
  result.compact
end