is there a way we can create or update apim named values through power-shell or azure cli. i tried searching the Microsoft documents i was not able to get anything related. is there any command let , im trying to create new named values or update existing named values through power-shell or azure cli
1
votes
1 Answers
0
votes
As far as a quick research told me, there is no idiomatic Azure CLI command to do this at the moment.
However, you can achieve the same result using the az rest
command:
az rest \
--method put \
--uri https://management.azure.com/subscriptions/$CURRENT_SUBSCRIPTION/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.ApiManagement/service/$APIM/namedValues/$NAME?api-version=2019-12-01 \
--body '{"properties":{"displayName":"$DISPLAYNAME","value": "$VALUE","secret":$SECRET_BOOLEAN}}'
Replace the $CURRENT_SUBSCRIPTION, $RESOURCE_GROUP, $APIM, $NAME, $DISPLAYNAME, $VALUE, $SECRET_BOOLEAN
with your values or PowerShell variables.