- Print
- Comment
- DarkLight
- PDF
Step 13 - Replace tokens in APIM .xml files - Build
Article summary
Did you find this summary helpful?
Thank you for your feedback!
In the Visual Studio solution I have a project containing xml files which are used for the xml files which contain the APIM policy. In this task we will configure those files so that when we depoy them to APIM they have any settings configured correctly.
In the case of our solution we will be injecting the key value into the policy which will be configured to be set as the x-functions-key header which is passed to the back end function app.
A picture of the configuration for this task is:
YAML
The yaml for this task is:
steps:
- task: qetza.replacetokens.replacetokens-task.replacetokens@3
displayName: 'Replace tokens in APIM **/*.xml'
inputs:
rootDirectory: '$(Build.ArtifactStagingDirectory)\APIM'
targetFiles: 'APIM/*.xml'
tokenPrefix: '__'
tokenSuffix: '__'
Was this article helpful?