Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Is it possible to set the mapIdentifier value from a variable for a KeyValueMapOperations policy?

Hello,

Is it possible to set the mapIdentifier value from a variable for a KeyValueMapOperations policy? This would be helpful so that folks could just have one KVM operations policy in a shared flow and not have to have one in each proxy. Thanks. Have a good weekend!

Solved Solved
0 11 2,771
1 ACCEPTED SOLUTION

NEW ANSWER, 2021 September: YES

Since the original question and answer here, Apigee has added the ability to set the map identifier in a variable. The way to do it is omit the mapIdentifier attribute, and add a MapName element. The syntax looks like this:

<KeyValueMapOperations name='KVM-Get'>
  <Scope>environment</Scope>
  <ExpiryTimeInSecs>300</ExpiryTimeInSecs>
  <!-- specify the map name via a variable here -->
  <MapName ref='mapname'/>
  <Get assignTo="private.myvar">
    <Key>
      <Parameter ref='request.queryparam.key'/>
    </Key>
  </Get>
</KeyValueMapOperations>

View solution in original post

11 REPLIES 11