Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.67k stars 5.09k forks source link

[Question] Are azure storage account ID properties immutable or mutable? #30108

Open Nefcanto opened 2 months ago

Nefcanto commented 2 months ago

API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetProperties.json

API Spec version

2023-10-15

Question/Query

I want to create an internal application to automate some tasks regarding our storage accounts. I saw that the JSON output contains an ID property. But this ID is calculated. Is this ID mutable? What happens if I change the resource group of a storage account? How should I update the storage account IDs in my database?

  "id": "/subscriptions/some-uuid/resourceGroups/some-name/providers/Microsoft.Storage/storageAccounts/some-name",

Environment

No response

blueww commented 2 months ago

@Nefcanto

After you create the storage account, normally the storage account resource ID won't change.

However, there are scenario to move storage account to another subscription and resource group (see doc), In this case, it will change.

Nefcanto commented 2 months ago

@blueww, thank you for the doc reference. The answer was clear.