Skip to content

Commit 1ed88e7

Browse files
committed
Added CLI steps to quickstart
1 parent c2dcca1 commit 1ed88e7

File tree

3 files changed

+154
-2
lines changed

3 files changed

+154
-2
lines changed

articles/operator-insights/data-product-create.md

Lines changed: 154 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,97 @@ Azure key Vault Resource is used to store your Customer Managed Key (CMK) for da
4242
1. Copy the Key Identifier URI to your clipboard to use when creating the Data Product.
4343

4444
# [Azure CLI](#tab/azure-cli)
45+
<!-- CLI link is [Create an Azure Key Vault resource](../key-vault/general/quick-create-cli.md) in the same subscription and resource group where you intend to deploy the Data Product resource. -->
4546

46-
Azure CLI...
47+
You can sign in to Azure and run Azure CLI commands in one of two ways:
4748

48-
<!-- CLI link is [Create an Azure Key Vault resource](../key-vault/general/quick-create-cli.md) in the same subscription and resource group where you intend to deploy the Data Product resource. -->
49+
- You can run CLI commands from within the Azure portal, in Azure Cloud Shell.
50+
- You can install the CLI and run CLI commands locally.
51+
52+
### Use Azure Cloud Shell
53+
54+
Azure Cloud Shell is a free Bash shell that you can run directly within the Azure portal. The Azure CLI is preinstalled and configured to use with your account. Select the **Cloud Shell** button on the menu in the upper-right section of the Azure portal:
55+
56+
[![Cloud Shell](./media/dp-quickstart-create/cloud-shell-menu.png)](https://portal.azure.com)
57+
58+
The button launches an interactive shell that you can use to run the steps outlined in this how-to article:
59+
60+
[![Screenshot showing the Cloud Shell window in the portal](./media/dp-quickstart-create/cloud-shell.png)](https://portal.azure.com)
61+
62+
63+
### Install the Azure CLI locally
64+
65+
You can also install and use the Azure CLI locally. If you plan to use Azure CLI locally, make sure you have installed the latest version of the Azure CLI. See [Install the Azure CLI](/cli/azure/install-azure-cli).
66+
Azure Cloud Shell is a free Bash shell that you can run directly within the Azure portal. The Azure CLI is preinstalled and configured to use with your account. Select the Cloud Shell button on the menu in the upper-right section of the Azure portal:
67+
68+
To launch Azure Cloud Shell, sign in to the Azure portal.
69+
70+
To log into your local installation of the CLI, run the az sign-in command:
71+
72+
```azurecli-interactive
73+
az login
74+
```
75+
76+
## Change the active subscription
77+
78+
Azure subscriptions have both a name and an ID. You can switch to a different subscription using [az account set](/cli/azure/account#az-account-set) specifying the desired subscription ID or name.
79+
80+
```azurecli-interactive
81+
# change the active subscription using the subscription name
82+
az account set --subscription "My Demos"
83+
84+
# change the active subscription using the subscription ID
85+
az account set --subscription "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
86+
```
87+
88+
## Create a resource group
89+
90+
A resource group is a logical container into which Azure resources are deployed and managed. Use the az group create command to create a resource group named myResourceGroup in the eastus location.
91+
92+
```azurecli-interactive
93+
az group create --name "myResourceGroup" --location "EastUS"
94+
```
95+
96+
## Create a key vault
97+
98+
Use the Azure CLI az keyvault create command to create a Key Vault in the resource group from the previous step. You will need to provide some information:
99+
100+
- Key vault name: A string of 3 to 24 characters that can contain only numbers (0-9), letters (a-z, A-Z), and hyphens (-)
101+
102+
Important
103+
104+
Each key vault must have a unique name. Replace <your-unique-keyvault-name> with the name of your key vault in the following examples.
105+
106+
- Resource group name: myResourceGroup.
107+
108+
- The location: EastUS.
109+
110+
```azurecli-interactive
111+
az keyvault create --name "<your-unique-keyvault-name>" --resource-group "myResourceGroup" --location "EastUS"
112+
```
113+
114+
The output of this command shows properties of the newly created key vault. Take note of the two properties listed below:
115+
116+
Vault Name: The name you provided to the --name parameter above.
117+
Vault URI: In the example, this is https://<your-unique-keyvault-name>.vault.azure.net/. Applications that use your vault through its REST API must use this URI.
118+
At this point, your Azure account is the only one authorized to perform any operations on this new vault.
119+
120+
## Key vault role assignment
121+
122+
Provide your user account with the Key Vault Administrator role on the Azure Key Vault resource.
123+
124+
```azurecli-interactive
125+
az role assignment create --role "Key Vault Administrator" --assignee <<user email address>> --scope /subscriptions/{subscriptionid}/resourcegroups/{resource-group-name}/providers/Microsoft.KeyVault/vaults/{key-vault-name}
126+
```
127+
Replace the values for subscriptionid, resource-group-name, and key-vault-name with the appropriate values.
128+
129+
## Create a Key
130+
131+
```azurecli-interactive
132+
az keyvault key create --vault-name "<your-unique-keyvault-name>" -n ExampleKey --protection software
133+
```
134+
135+
From the output screen copy the KeyID and store it in your clipboard for later use.
49136

50137
# [Azure PowerShell](#tab/azure-powershell)
51138

@@ -68,6 +155,25 @@ Azure CLI...
68155

69156
<!-- Managed identity link for the CLI: /entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities?pivots=identity-mi-methods-azcli -->
70157

158+
To create a user-assigned managed identity, your account needs the Managed Identity Contributor role assignment.
159+
160+
Use the az identity create command to create a user-assigned managed identity. The -g parameter specifies the resource group where to create the user-assigned managed identity. The -n parameter specifies its name. Replace the <RESOURCE GROUP> and <USER ASSIGNED IDENTITY NAME> parameter values with your own values.
161+
162+
Important
163+
164+
When you create user-assigned managed identities, only alphanumeric characters (0-9, a-z, and A-Z) and the hyphen (-) are supported.
165+
166+
```azurecli-interactive
167+
az identity create -g <RESOURCE GROUP> -n <USER ASSIGNED IDENTITY NAME>
168+
```
169+
170+
Copy the principalId from the output screen and store it in your clipboard for later use.
171+
172+
## Assign User-Assigned Managed Identity to Key Vault
173+
174+
```azurecli-interactive
175+
az role assignment create --role "Key Vault Administrator" --assignee <<pricipalID from above step>> --scope /subscriptions/{subscriptionid}/resourcegroups/{resource-group-name}/providers/Microsoft.KeyVault/vaults/{key-vault-name}
176+
```
71177
# [Azure PowerShell](#tab/azure-powershell)
72178

73179
PowerShell....
@@ -113,6 +219,52 @@ You create the Azure Operator Insights Data Product resource.
113219

114220
Azure CLI...
115221

222+
To create a Azure Operator Insights DataProduct with just mandatory parameters, use the following command:
223+
224+
```azurecli-interactive
225+
az network-analytics data-product create --name <<dpname>> --resource-group <<rgname>> --location <<azurelocation>> --publisher Microsoft --product <<product name>> --major-version <<product major version>>
226+
```
227+
228+
To create a Azure Operator Insights DataProduct with all parameters, use the following command:
229+
230+
```azurecli-interactive
231+
az network-analytics data-product create --data-product-name
232+
--resource-group
233+
[--encryption-key]
234+
[--identity]
235+
[--key-encryption-enable {Disabled, Enabled}]
236+
[--location]
237+
[--major-version]
238+
[--managed-rg]
239+
[--networkacls]
240+
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
241+
[--owners]
242+
[--private-links-enabled {Disabled, Enabled}]
243+
[--product]
244+
[--public-network-access {Disabled, Enabled}]
245+
[--publisher]
246+
[--purview-account]
247+
[--purview-collection]
248+
[--redundancy {Disabled, Enabled}]
249+
[--tags]
250+
```
251+
252+
253+
Create data product with all parameter
254+
255+
```azurecli-interactive
256+
az network-analytics data-product create --name <<dpname>> --resource-group <<rgname>> --location <<azurelocation>> --publisher Microsoft --product <<productname>> --major-version <<product major version> --owners <<xyz@email>> --customer-managed-key-encryption-enabled Enabled --key-encryption-enable Enabled --encryption-key '{"keyVaultUri":"<vaulturi>","keyName":"<keyname>","keyVersion":"<version>"}' --purview-account purviewaccount --purview-collection collection --identity '{"type":"userAssigned","userAssignedIdentities":{"/subscriptions/<subid>/resourceGroups/<rgname>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<idname>"}}' --tags '{"key1":"value1","key2":"value2"}'
257+
```
258+
For dpname, rgname, azurelocation use the use desired values.
259+
For Product name and corresponding versions
260+
- Quality of Experience - Affirmed MCC GIGW
261+
- 1.0
262+
- Quality of Experience - Affirmed MCC PGW or GGSN
263+
- 1.0
264+
- Monitoring - Affirmed MCC
265+
- 0 or 1
266+
For ownersemail, vaulturi, keyname, version, purviewaccount, collection, uami and tags use the desired values.
267+
116268
# [Azure PowerShell](#tab/azure-powershell)
117269

118270
PowerShell....
3.27 KB
Loading
86 KB
Loading

0 commit comments

Comments
 (0)