Using explicit string arrays as referenceValue in AWS Flexmatch

0

For Flexmatch rules, is it possible to use an explicit string array as a referenceValue, such as:

{
     "name": "P1CanJungle",
     "description": "Player 1 can play Jungle",
     "type": "collection",
     "operation": "reference_intersection_count",
     "measurements": ["flatten(teams[P1].players.attributes[roles])"],
     "referenceValue": ["jungle"],
     "minCount": 1
},

This is intended for use in a compound rule, where we make an exception and allow specific pairs of roles if their roles are identical and thus normally not permitted as a match.

I've tried a variety of syntaxes on the referenceValue, but they all result in "Collection rule encountered a measurement which was not a list of string lists; location: rules section: array index=0: P1CanTop".

Thanks!

EDIT - Ahhh it seems I cannot read thoroughly enough - you can use the "contains" operation on collections for this.

jult
질문됨 일 년 전201회 조회
1개 답변
0

You could use contains operation instead of reference_intersection_count. For more information this you may refer match-rules-reference-ruletype-collection and match-examples-3.

AWS
지원 엔지니어
답변함 일 년 전
  • contains would only work for a single string reference value but not with array of strings

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠