I was given a task in my internship which is to use REST APIs to check if a managed identity exists inside of a specific Azure service account, create it if it doesn't exist or delete it. After this is done I have to do the same with storage accounts, basically we want to use Managed Identity for IaaS PostgreSQL and MSSQL backups on Azure VMs.
They linked 2 resources for reference:
[https://docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-rest]
I've tried using the other api files that were already there as a reference but I'm not sure my changes are good since it's my first official time working with APIs, and using Azure. This is the format that I'm trying to follow
@app.route("/v1/initiate/<machine_id>", methods=["POST"])
@func_logger("cloudx_workflow_service", "state_machine_workflow")
def initiate_workflow(machine_id, **kwargs):
"""
Initiate state machine workflow
Args:
machine_id:
**kwargs:
Returns:
"""
I'm open to any help, advice, resources you guys recommend.