Reputation: 537
I am having an azure function in python. I also have my key values defined in function keys.
How to read this in python program. I see i can add key value pair in Configuration of the function app.But i need these values specific to a function.
My azure function is based on python 3.7
Upvotes: 0
Views: 1617
Reputation: 24827
From the Microsoft documentation, You can obtain function keys programmatically by using Key management APIs
Key management API
The Functions Runtime exposes a management API that enables consumers to programmatically add, delete, and update function keys.
Since this API is exposed by the runtime, the base URL is:
https://<functionappname>.azurewebsites.net/
Function keys collection resource: admin/functions/{functionname}/keys
GET Retrieves the function keys
Request:
GET /admin/functions/{functionname}/keys
Response
{
"keys": [
{
"name": "keyname",
"value": "keyvalue",
"links": [
{
"rel": "self",
"href": "https://baseuri/admin/functions/{functionname}/keys/{keyname}"
}
]
}
],
"links": [
{
"rel": "self",
"href": "http://baseuri/admin/functions/{functionname}/keys"
}
]
}
Upvotes: 1