Set Storage Account
Creates or updates a new storage account.
PUT https://{vaultBaseUrl}/storage/{storage-account-name}?api-version={api-version}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
vaultBaseUrl
|
path | True |
|
The vault name, for example https://myvault.vault.azure.net. |
|
storage-account-name
|
path | True |
|
The name of the storage account. Regex pattern: |
|
api-version
|
query | True |
|
Client API version. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| activeKeyName | True |
|
Current active storage account key name. |
| attributes |
The attributes of the storage account. |
||
| autoRegenerateKey | True |
|
whether keyvault should manage the storage account for the user. |
| regenerationPeriod |
|
The key regeneration time duration specified in ISO-8601 format. |
|
| resourceId | True |
|
Storage account resource id. |
| tags |
|
Application specific metadata in the form of key-value pairs. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
The created storage account. |
|
| Other Status Codes |
Key Vault error response describing why the operation failed. |
Examples
Set Storage account
Sample Request
PUT https://{vaultBaseUrl}/storage/setStrg01?api-version=2016-10-01
{
"resourceId": "/subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Storage/storageAccounts/kvstorageacc",
"activeKeyName": "key2",
"autoRegenerateKey": true,
"regenerationPeriod": "P15D",
"attributes": {
"enabled": true
},
"tags": {
"tag1": "val1",
"tag2": "val2"
}
}
Sample Response
{
"id": "https://storage-sdk-test.vault-int.azure-int.net/storage/setStrg01",
"resourceId": "/subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Storage/storageAccounts/kvstorageacc",
"activeKeyName": "key2",
"autoRegenerateKey": true,
"regenerationPeriod": "P15D",
"attributes": {
"enabled": true,
"created": 1490738386,
"updated": 1490738386
},
"tags": {
"tag1": "val1",
"tag2": "val2"
}
}
Definitions
| Error |
The key vault server error. |
| KeyVaultError | |
| StorageAccountAttributes |
The attributes of the storage account. |
| StorageBundle |
The key vault server error.
| Name | Type | Description |
|---|---|---|
| code |
|
The error code. |
| innererror | ||
| message |
|
The error message. |
| Name | Type | Description |
|---|---|---|
| error |
The key vault server error. |
The attributes of the storage account.
| Name | Type | Description |
|---|---|---|
| created |
|
Creation time in UTC. |
| enabled |
|
the enabled state of the object. |
| updated |
|
Last updated time in UTC. |
| Name | Type | Description |
|---|---|---|
| activeKeyName |
|
The current active storage account key name. |
| attributes |
The storage account attributes. |
|
| autoRegenerateKey |
|
whether keyvault should manage the storage account for the user. |
| id |
|
The storage account id. |
| regenerationPeriod |
|
The key regeneration time duration specified in ISO-8601 format. |
| resourceId |
|
The storage account resource id. |
| tags |
|
Application specific metadata in the form of key-value pairs |