Skip to content

Commit 205649d

Browse files
committed
Learn Editor: Update personal-data-delete-export.md
1 parent e1982fb commit 205649d

File tree

1 file changed

+7
-97
lines changed

1 file changed

+7
-97
lines changed

articles/devtest-labs/personal-data-delete-export.md

Lines changed: 7 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -25,49 +25,16 @@ DevTest Labs uses the user email address to send auto shutdown email notificatio
2525

2626
![Setting email at the VM level](./media/personal-data-delete-export/vm-user-email.png)
2727

28-
### User object ID
29-
DevTest Labs uses the user object ID to show month-over-month cost trends and cost by resource information to lab admins. It allows them to track costs and manage thresholds for their Lab.
30-
31-
**Estimated cost trend for the current calendar month:**
32-
![Estimated cost trend for the current calendar month](./media/personal-data-delete-export/estimated-cost-trend-per-month.png)
33-
34-
**Estimated month-to-date cost by resource:**
35-
![Estimated month-to-date cost by resource](./media/personal-data-delete-export/estimated-month-to-date-cost-by-resource.png)
36-
37-
3828
## Why do we need this personal data?
39-
The DevTest Labs service uses the personal data for operational purposes. This data is critical for the service to deliver key features. If you set a retention policy on the user email address, lab users do not receive timely auto shutdown email notifications after their email address is deleted from our system. Similarly, the lab admin can't view month-over-month cost trends and cost by resource for machines in their labs if the user object IDs are deleted based on a retention policy. Therefore, this data needs to be retained for as long as the user's resource is active in the Lab.
29+
The DevTest Labs service uses the personal data for operational purposes. This data is critical for the service to deliver key features. If you set a retention policy on the user email address, lab users do not receive timely auto shutdown email notifications after their email address is deleted from our system. Therefore, this data needs to be retained for as long as the user's resource is active in the Lab.
4030

4131
## How can I have the system to forget my personal data?
4232
As a lab user, if you like to have this personal data deleted, you can do so by deleting the corresponding resource in the Lab. The DevTest Labs service anonymizes the deleted personal data 30 days after it's deleted by the user.
4333

4434
For example, If you delete your VM, or removed your email address, the DevTest Labs service anonymizes this data 30 days after the resource is deleted. The 30-day retention policy after deletion is to make sure that we provide an accurate month-over-month cost projection to the lab admin.
4535

4636
## How can I request an export on my personal data?
47-
You can export personal and lab usage data by using the Azure portal or PowerShell. The data is exported as two different CSV files:
48-
49-
- **disks.csv** - contains information about the disks being used by the different VMs
50-
- **virtualmachines.csv** - contains information about the VMs in the lab.
51-
52-
### Azure portal
53-
As a lab user, you can request an export on the personal data that the DevTest Labs service stores. To request for an export, navigate to the **Personal data** option on the **Overview** page of your lab. Select the **Request export** button kicks off the creation of a downloadable excel file in your Lab admin's storage account. You can then contact your lab admin to view this data.
54-
55-
1. Select **Personal data** on the left menu.
56-
57-
![Personal data page](./media/personal-data-delete-export/personal-data-page.png)
58-
2. Select the **resource group** that contains the lab.
59-
60-
![Select resource group](./media/personal-data-delete-export/select-resource-group.png)
61-
3. Select the **storage account** in the resource group.
62-
4. On the **Storage account** page, select **Blobs**.
63-
64-
![Select Blobs tile](./media/personal-data-delete-export/select-blobs-tile.png)
65-
5. Select the container named **labresourceusage** in the list of containers.
66-
67-
![Select blob container](./media/personal-data-delete-export/select-blob-container.png)
68-
6. Select the **folder** named after your lab. You find **csv** files for **disks** and **virtual machines** in your lab in this folder. You can download these csv files, filter the content for the lab user requesting an access, and share it with them.
69-
70-
![Download CSV file](./media/personal-data-delete-export/download-csv-file.png)
37+
You can export personal and lab usage data by using the Azure PowerShell. The data will be exported as a csv file with the date and time of the export requested in the name.
7138

7239
### Azure PowerShell
7340

@@ -136,71 +103,14 @@ else
136103
The key components in the above sample are:
137104

138105
- The Invoke-AzureRmResourceAction command.
139-
106+
140107
```
141-
Invoke-AzureRmResourceAction -Action 'exportLabResourceUsage' -ResourceId $resourceId -Parameters $actionParameters -Force
108+
Invoke-AzureRmResourceAction -Action 'ExportResourceUsage' -ResourceId $resourceId -Parameters $actionParameters -Force
142109
```
143110
- Two action parameters
144-
- **blobStorageAbsoluteSasUri** - The storage account URI with the Shared Access Signature (SAS) token. In the PowerShell script, this value could be passed in instead of the storage key.
145-
- **usageStartDate** - The beginning date to pull data, with the end date being the current date on which the action is executed. The granularity is at the day level, so even if you add time information, it will be ignored.
146-
147-
### Exported data - a closer look
148-
Now let’s take a closer look at the exported data. As mentioned earlier, once the data are successfully exported, there will be two CSV files.
149-
150-
The **virtualmachines.csv** contains the following data columns:
151-
152-
| Column name | Description |
153-
| ----------- | ----------- |
154-
| SubscriptionId | The subscription identifier that the lab exists in. |
155-
| LabUId | Unique GUID identifier for the lab. |
156-
| LabName | Name of the lab. |
157-
| LabResourceId | Fully qualified lab resource ID. |
158-
| ResourceGroupName | Name of the resource group that contains the VM |
159-
| ResourceId | Fully qualified resource ID for the VM. |
160-
| ResourceUId | GUID for the VM |
161-
| Name | Virtual machine name. |
162-
| CreatedTime | The date-time at which the VM was created. |
163-
| DeletedDate | The date-time at which the VM was deleted. If it's empty, deletion hasn't occurred, yet. |
164-
| ResourceOwner | Owner of the VM. If the value is empty, then it's either a claimable VM or created by a service principal. |
165-
| PricingTier | Pricing tier of the VM |
166-
| ResourceStatus | Availability state of the VM. Active, if still exists or Inactive, if the VM has been deleted. |
167-
| ComputeResourceId | Fully qualified virtual machine compute resource identifier. |
168-
| Claimable | Set to true if the VM is a claimable VM |
169-
| EnvironmentId | The environment resource identifier within which the Virtual machine was created in. It's empty when the VM wasn't created as part of an environment resource. |
170-
| ExpirationDate | Expiration date for the VM. It's set to empty, if an expiration date hasn't been set.
171-
| GalleryImageReferenceVersion | Version of the VM base image. |
172-
| GalleryImageReferenceOffer | Offer of the VM base image. |
173-
| GalleryImageReferencePublisher | Publisher of the VM base image. |
174-
| GalleryImageReferenceSku | Sku of the VM base image |
175-
| GalleryImageReferenceOsType | OS type of the VM base image |
176-
| CustomImageId | Fully qualified ID of the VM base custom image. |
177-
178-
The data columns contained in **disks.csv** are listed below:
179-
180-
| Column name | Description |
181-
| ----------- | ----------- |
182-
| SubscriptionId | ID of the subscription that contains the lab |
183-
| LabUId | GUID for the lab |
184-
| LabName | Name of the lab |
185-
| LabResourceId | Fully qualified resource ID for the lab |
186-
| ResourceGroupName | Name of the resource group that contains the lab |
187-
| ResourceId | Fully qualified resource ID for the VM. |
188-
| ResourceUId | GUID for the VM |
189-
|Name | The name of the attached disk |
190-
| CreatedTime |The date and time at which the data disk was created. |
191-
| DeletedDate | The date and time at which the data disk was deleted. |
192-
| ResourceStatus | Status of the resource. Active, if the resource exists. Inactive, when deleted. |
193-
| DiskBlobName | Blob name for the data disk. |
194-
| DiskSizeGB | The size of the data disk. |
195-
| DiskType | Type of the data disk. 0 for Standard, 1 for Premium. |
196-
| LeasedByVmId | Resource ID of the VM to which the data disk has been attached. |
197-
198-
199-
> [!NOTE]
200-
> If you are dealing with multiple labs and want to get overall information, the two key columns are the **LabUID** and the **ResourceUId**, which are the unique ids across subscriptions.
201-
202-
The exported data can be manipulated and visualized using tools, like SQL Server, Power BI, etc. This feature is especially useful when you want to report usage of your lab to your management team that may not be using the same Azure subscription as you do.
203-
111+
- **blobStorageAbsoluteSasUri** - The storage account URI with the Shared Access Signature (SAS) token. In the PowerShell script, this value could be passed in instead of the storage key.
112+
- **usageStartDate** - The beginning date to pull data, with the end date being the current date on which the action is executed. The granularity is at the day level, so even if you add time information, it will be ignored.
113+
204114
## Next steps
205115
See the following article:
206116

0 commit comments

Comments
 (0)