Storage file, queue and table services
Rahul
21
Reputation points
Hello, I created a storage account and had few checks to code for.
- Ensures file shares do not allow full write delete or read ACL permissions
- Ensures tables do not allow full write delete or read ACL permissions
- Ensures queues do not allow full write delete or read ACL permissions
Firstly, how do you check this on the portal? Secondly, what is the endpoint to get the json data of these checks?
def get_token():
r = requests.post("https://login.microsoftonline.com/tenantID/oauth2/token",data={"grant_type": "client_credentials", "client_secret": "xxxxx","client_id": "xxxxxx", "resource": "https://management.azure.com"})
ret_body = r.json()
return ret_body['access_token']
token = get_token()
headers = {'Authorization': 'Bearer ' + token}
conn = http.client.HTTPSConnection('management.azure.com')
conn.request("GET", '/subscriptions/xxxxx/providers/Microsoft.Storage/storageAccounts?api-version=2019-06-01', "", headers)
response = conn.getresponse()
data = response.read()
data = data.decode('utf-8')
data = json.loads(data)
print(data)
This is how I retrieved the json data for the storage account i created.
Now I know this is how I list queues https://storagename.queue.core.windows.net?comp=list
Since I work for a client, there can be multiple storage accounts and queues/tables/files
How do I retrieve the json data for these and get the ACL?
Sign in to answer