/AWS1/IF_EVY=>UPDATEFEATURE()
¶
About UpdateFeature¶
Updates an existing feature.
You can't use this operation to update the tags of an existing feature. Instead, use TagResource.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_project
TYPE /AWS1/EVYPROJECTREF
/AWS1/EVYPROJECTREF
¶
The name or ARN of the project that contains the feature to be updated.
iv_feature
TYPE /AWS1/EVYFEATURENAME
/AWS1/EVYFEATURENAME
¶
The name of the feature to be updated.
Optional arguments:¶
iv_evaluationstrategy
TYPE /AWS1/EVYFEATUREEVALSTRATEGY
/AWS1/EVYFEATUREEVALSTRATEGY
¶
Specify
ALL_RULES
to activate the traffic allocation specified by any ongoing launches or experiments. SpecifyDEFAULT_VARIATION
to serve the default variation to all users instead.
iv_description
TYPE /AWS1/EVYDESCRIPTION
/AWS1/EVYDESCRIPTION
¶
An optional description of the feature.
it_addorupdatevariations
TYPE /AWS1/CL_EVYVARIATIONCONFIG=>TT_VARIATIONCONFIGSLIST
TT_VARIATIONCONFIGSLIST
¶
To update variation configurations for this feature, or add new ones, specify this structure. In this array, include any variations that you want to add or update. If the array includes a variation name that already exists for this feature, it is updated. If it includes a new variation name, it is added as a new variation.
it_removevariations
TYPE /AWS1/CL_EVYVARIATIONNAMELST_W=>TT_VARIATIONNAMELIST
TT_VARIATIONNAMELIST
¶
Removes a variation from the feature. If the variation you specify doesn't exist, then this makes no change and does not report an error.
This operation fails if you try to remove a variation that is part of an ongoing launch or experiment.
iv_defaultvariation
TYPE /AWS1/EVYVARIATIONNAME
/AWS1/EVYVARIATIONNAME
¶
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.
it_entityoverrides
TYPE /AWS1/CL_EVYENTOVERRIDEMAP_W=>TT_ENTITYOVERRIDEMAP
TT_ENTITYOVERRIDEMAP
¶
Specified 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.
This parameter is limited to 2500 overrides or a total of 40KB. The 40KB limit includes an overhead of 6 bytes per override.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_evyupdatefeaturersp
/AWS1/CL_EVYUPDATEFEATURERSP
¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->/aws1/if_evy~updatefeature(
it_addorupdatevariations = VALUE /aws1/cl_evyvariationconfig=>tt_variationconfigslist(
(
new /aws1/cl_evyvariationconfig(
io_value = new /aws1/cl_evyvariablevalue(
iv_boolvalue = ABAP_TRUE
iv_doublevalue = '0.1'
iv_longvalue = 123
iv_stringvalue = |string|
)
iv_name = |string|
)
)
)
it_entityoverrides = VALUE /aws1/cl_evyentoverridemap_w=>tt_entityoverridemap(
(
VALUE /aws1/cl_evyentoverridemap_w=>ts_entityoverridemap_maprow(
value = new /aws1/cl_evyentoverridemap_w( |string| )
key = |string|
)
)
)
it_removevariations = VALUE /aws1/cl_evyvariationnamelst_w=>tt_variationnamelist(
( new /aws1/cl_evyvariationnamelst_w( |string| ) )
)
iv_defaultvariation = |string|
iv_description = |string|
iv_evaluationstrategy = |string|
iv_feature = |string|
iv_project = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_feature = lo_result->get_feature( ).
IF lo_feature IS NOT INITIAL.
lv_featurearn = lo_feature->get_arn( ).
lv_featurename = lo_feature->get_name( ).
lv_projectarn = lo_feature->get_project( ).
lv_featurestatus = lo_feature->get_status( ).
lv_timestamp = lo_feature->get_createdtime( ).
lv_timestamp = lo_feature->get_lastupdatedtime( ).
lv_description = lo_feature->get_description( ).
lv_featureevaluationstrate = lo_feature->get_evaluationstrategy( ).
lv_variationvaluetype = lo_feature->get_valuetype( ).
LOOP AT lo_feature->get_variations( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_variationname = lo_row_1->get_name( ).
lo_variablevalue = lo_row_1->get_value( ).
IF lo_variablevalue IS NOT INITIAL.
lv_boolean = lo_variablevalue->get_boolvalue( ).
lv_string = lo_variablevalue->get_stringvalue( ).
lv_long = lo_variablevalue->get_longvalue( ).
lv_double = lo_variablevalue->get_doublevalue( ).
ENDIF.
ENDIF.
ENDLOOP.
lv_variationname = lo_feature->get_defaultvariation( ).
LOOP AT lo_feature->get_evaluationrules( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_rulename = lo_row_3->get_name( ).
lv_ruletype = lo_row_3->get_type( ).
ENDIF.
ENDLOOP.
LOOP AT lo_feature->get_tags( ) into ls_row_4.
lv_key = ls_row_4-key.
lo_value = ls_row_4-value.
IF lo_value IS NOT INITIAL.
lv_tagvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_feature->get_entityoverrides( ) into ls_row_5.
lv_key_1 = ls_row_5-key.
lo_value_1 = ls_row_5-value.
IF lo_value_1 IS NOT INITIAL.
lv_variationname = lo_value_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.