Skip to content

Commit 0ccca04

Browse files
committed
updates content and screenshots
1 parent b229530 commit 0ccca04

File tree

3 files changed

+120
-18
lines changed

3 files changed

+120
-18
lines changed
Loading
Loading

articles/azure-resource-manager/managed-applications/microsoft-storage-storageaccountselector.md

Lines changed: 120 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,34 @@
22
title: StorageAccountSelector UI element
33
description: Describes the Microsoft.Storage.StorageAccountSelector UI element for Azure portal.
44
author: davidsmatlak
5-
6-
ms.topic: conceptual
7-
ms.date: 06/28/2018
85
ms.author: davidsmatlak
9-
6+
ms.topic: conceptual
7+
ms.date: 03/17/2023
108
---
9+
1110
# Microsoft.Storage.StorageAccountSelector UI element
1211

13-
A control for selecting a new or existing storage account.
12+
A control that's used to select a new or existing storage account.
13+
14+
Storage account names must be globally unique across Azure with a length of 3-24 characters, and include only lowercase letters or numbers.
1415

1516
## UI sample
1617

17-
The control shows the default value.
18+
The `StorageAccountSelector` control shows the default name for a storage account. The default is set in your code.
1819

19-
![Microsoft.Storage.StorageAccountSelector](./media/managed-application-elements/microsoft-storage-storageaccountselector.png)
20+
:::image type="content" source="./media/managed-application-elements/microsoft-storage-storageaccountselector.png" alt-text="Screenshot of the storage account selector element that shows the default value for a new storage account.":::
2021

21-
The control enables the user to create a new storage account or select an existing storage account.
22+
The `StorageAccountSelector` control allows you to create a new storage account or select an existing storage account.
2223

23-
![Microsoft.Storage.StorageAccountSelector new](./media/managed-application-elements/microsoft-storage-storageaccountselector-new.png)
24+
:::image type="content" source="./media/managed-application-elements/microsoft-storage-storageaccountselector-new.png" alt-text="Screenshot that shows the storage account selector options to create a new storage account.":::
2425

2526
## Schema
2627

2728
```json
2829
{
2930
"name": "element1",
3031
"type": "Microsoft.Storage.StorageAccountSelector",
31-
"label": "Storage account",
32+
"label": "Storage account selector",
3233
"toolTip": "",
3334
"defaultValue": {
3435
"name": "storageaccount01",
@@ -50,19 +51,120 @@ The control enables the user to create a new storage account or select an existi
5051
```json
5152
{
5253
"name": "storageaccount01",
53-
"resourceGroup": "rg01",
54-
"type": "Premium_LRS",
55-
"newOrExisting": "new"
54+
"resourceGroup": "demoRG",
55+
"type": "Standard_LRS",
56+
"newOrExisting": "new",
57+
"kind": "StorageV2"
5658
}
5759
```
5860

5961
## Remarks
6062

61-
- If specified, `defaultValue.name` is automatically validated for uniqueness. If the storage account name isn't unique, the user must specify a different name or choose an existing storage account.
62-
- The default value for `defaultValue.type` is **Premium_LRS**.
63+
- The `defaultValue.name` is required and the value is automatically validated for uniqueness. If the storage account name isn't unique, the user must specify a different name or choose an existing storage account.
64+
- The default value for `defaultValue.type` is **Premium_LRS**. You can set any storage account type as the default value. For example, _Standard_LRS_ or _Standard_GRS_.
6365
- Any type not specified in `constraints.allowedTypes` is hidden, and any type not specified in `constraints.excludedTypes` is shown. `constraints.allowedTypes` and `constraints.excludedTypes` are both optional, but can't be used simultaneously.
64-
- If `options.hideExisting` is **true**, the user can't choose an existing storage account. The default value is **false**.
66+
- If `options.hideExisting` is **true**, the user can't choose an existing storage account. The default value is **false**. The control only shows storage accounts as _existing_ if they are in same resource group and region as the selections made on the **Basics** tab.
67+
- The `kind` property displays the value if a new storage account was created, or an existing storage account's value.
68+
69+
## Example
70+
71+
The default values for the storage account name and type are examples. You can set your own default values for your environment.
72+
73+
In the `outputs` section, the `storageSelector` output includes all the values for a storage account. The `storageKind` and `storageName` are examples of how to output specific values.
74+
75+
```json
76+
{
77+
"$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#",
78+
"handler": "Microsoft.Azure.CreateUIDef",
79+
"version": "0.1.2-preview",
80+
"parameters": {
81+
"basics": [
82+
{}
83+
],
84+
"steps": [
85+
{
86+
"name": "StorageAccountSelector",
87+
"label": "Storage account selector",
88+
"elements": [
89+
{
90+
"name": "storageSelectorElement",
91+
"type": "Microsoft.Storage.StorageAccountSelector",
92+
"label": "Storage account name",
93+
"toolTip": "",
94+
"defaultValue": {
95+
"name": "storageaccount01",
96+
"type": "Premium_LRS"
97+
},
98+
"options": {
99+
"hideExisting": false
100+
},
101+
"visible": true
102+
}
103+
]
104+
}
105+
],
106+
"outputs": {
107+
"location": "[location()]",
108+
"storageSelector": "[steps('StorageAccountSelector').storageSelectorElement]",
109+
"storageKind": "[steps('StorageAccountSelector').storageSelectorElement.kind]",
110+
"storageName": "[steps('StorageAccountSelector').storageSelectorElement.name]"
111+
}
112+
}
113+
}
114+
```
115+
116+
## Example output
117+
118+
The output for a _new_ storage account.
119+
120+
```json
121+
{
122+
"location": {
123+
"value": "westus3"
124+
},
125+
"storageSelector": {
126+
"value": {
127+
"name": "demostorageaccount01",
128+
"resourceGroup": "demoRG",
129+
"type": "Standard_GRS",
130+
"newOrExisting": "new",
131+
"kind": "StorageV2"
132+
}
133+
},
134+
"storageKind": {
135+
"value": "StorageV2"
136+
},
137+
"storageName": {
138+
"value": "demostorageaccount01"
139+
}
140+
}
141+
```
142+
143+
The output for an _existing_ storage account.
144+
145+
```json
146+
{
147+
"location": {
148+
"value": "westus3"
149+
},
150+
"storageSelector": {
151+
"value": {
152+
"name": "demostorage99",
153+
"resourceGroup": "demoRG",
154+
"type": "Standard_LRS",
155+
"newOrExisting": "existing",
156+
"kind": "StorageV2"
157+
}
158+
},
159+
"storageKind": {
160+
"value": "StorageV2"
161+
},
162+
"storageName": {
163+
"value": "demostorage99"
164+
}
165+
}
166+
```
65167

66168
## Next steps
67-
* For an introduction to creating UI definitions, see [Getting started with CreateUiDefinition](create-uidefinition-overview.md).
68-
* For a description of common properties in UI elements, see [CreateUiDefinition elements](create-uidefinition-elements.md).
169+
- For an introduction to creating UI definitions, go to [CreateUiDefinition.json for Azure managed application's create experience](create-uidefinition-overview.md).
170+
- For a description of common properties in UI elements, go to [CreateUiDefinition elements](create-uidefinition-elements.md).

0 commit comments

Comments
 (0)