I'm trying to add a simple rule via REST API but it does not persist. Response = OK, and no errors thrown. I can create the same rule via powershell and it works.
After submitting my JSON, I receive HttpStatus "OK" and get a response payload back, but the rule is not saved and shown in the Azure Portal.
I call this URL / PUT: https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default?api-version=2019-06-01
Request body:
{
"properties": {
"policy": {
"rules": [
{
"enabled": true,
"name": "myRule",
"type": "Lifecycle",
"definition": {
"actions": {
"baseBlob": {
"delete": {
"daysAfterModificationGreaterThan": 10
}
}
}
},
"filters": {
"blobTypes": [
"blockBlob"
]
}
}
]
}
}
}
HttpStatus = OK
Response body:
{
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default",
"name": "default",
"type": "Microsoft.Storage/storageAccounts/blobServices",
"properties": {}
}
Any ideas why this is not working, any updates API versions which I haven't found yet???