You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DevTest Labs can use ARM templates for many tasks, from creating and provisioning labs to adding users. This quickstart uses the [Creates a lab with a claimed VM](https://azure.microsoft.com/resources/templates/dtl-create-lab-windows-vm-claimed) ARM template from the [Azure Quickstart Templates gallery](https://learn.microsoft.com/samples/browse/?expanded=azure&products=azure-resource-manager).
20
+
DevTest Labs can use ARM templates for many tasks, from creating and provisioning labs to adding users. This quickstart uses the [Creates a lab with a claimed VM](https://azure.microsoft.com/resources/templates/dtl-create-lab-windows-vm-claimed) ARM template from the [Azure Quickstart Templates gallery](/samples/browse/?expanded=azure&products=azure-resource-manager).
Copy file name to clipboardExpand all lines: articles/devtest-labs/extend-devtest-labs-azure-functions.md
+11-16Lines changed: 11 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,18 +48,15 @@ The following diagram demonstrates the overall flow of function behavior in the
48
48
49
49
## Prerequisites
50
50
51
-
- To work with the sample in this walkthrough, you need a service principal that has permission to the subscription that contains the lab. The service principal must use password-based authentication.
51
+
- To work with the sample in this walkthrough, you need a service principal that has permission to the subscription that contains the lab. The service principal must use password-based authentication. If you already have a service principal that you can use in this walkthrough, you can continue to the [next section](#download-sample-and-build-solution-in-visual-studio).
52
52
53
-
> [!NOTE]
54
-
> If you already have a service principal that you can use in this walkthrough, you can continue to the [next section](#download-sample-and-build-solution-in-visual-studio).
55
-
56
-
1. To get the service principal, you can use the [Azure CLI](/cli/azure/create-an-azure-service-principal-azure-cli), [Azure PowerShell](/powershell/azure/create-azure-service-principal-azureps), or the [Azure portal](../active-directory/develop/howto-create-service-principal-portal.md).
53
+
1. To get the service principal, you can use the [Azure CLI](/cli/azure/azure-cli-sp-tutorial-1), [Azure PowerShell](/powershell/azure/create-azure-service-principal-azureps), or the [Azure portal](/entra/identity-platform/howto-create-service-principal-portal).
57
54
58
55
1. After you have the service principal, copy and save the application ID, key, and tenant ID values. You use the values later in the walkthrough.
59
56
60
57
## Download sample and build solution in Visual Studio
61
58
62
-
The source code for the sample is located in the [Azure DevTest Labs GitHub repository](https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/AzureFunctions). Both C# and PowerShell implementations are available.
59
+
The source code for the sample is located in the [DevTest Labs Internal Support Page integration with Azure Functions](https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/AzureFunctions) GitHub repository. The sample files support both C# and PowerShell implementations.
63
60
64
61
After you have the service principal, you're ready to get the sample source:
65
62
@@ -83,7 +80,7 @@ The next step is to deploy the sample Function application to Azure:
83
80
84
81
1. Complete the Wizard steps to publish a new or existing Azure Function App:
85
82
86
-
:::image type="content" source="./media/extend-devtest-labs-azure-functions/publish-dialog.png" border="false" alt-text="Screenshot that shows the Publish dialog for an Azure Function app in Visual Studio." lightbox="./media/extend-devtest-labs-azure-functions/publish-dialog.png":::
83
+
:::image type="content" source="./media/extend-devtest-labs-azure-functions/publish-dialog.png" border="false" alt-text="Screenshot that shows the Publish dialog for an Azure Function app in Visual Studio." lightbox="./media/extend-devtest-labs-azure-functions/publish-dialog-large.png":::
87
84
88
85
For detailed information on developing and deploying Azure Functions applications in Visual Studio, see [Develop Azure Functions by using Visual Studio](../azure-functions/functions-develop-vs.md).
89
86
@@ -95,13 +92,13 @@ After you publish the Function app, you need to get URLs for the functions from
95
92
96
93
1. On the **Overview** page for the Function app, locate the **Functions** section and select one of the functions: **UpdateInternalSupportPage** or **ApplyWindowsUpdateArtifact**:
97
94
98
-
:::image type="content" source="./media/extend-devtest-labs-azure-functions/select-function.png" border="false" alt-text="Screenshot that shows how to access the Azure functions for the Function app in the Azure portal." lightbox="./media/extend-devtest-labs-azure-functions/select-function.png":::
95
+
:::image type="content" source="./media/extend-devtest-labs-azure-functions/select-function.png" alt-text="Screenshot that shows how to access the Azure functions for the Function app in the Azure portal." lightbox="./media/extend-devtest-labs-azure-functions/select-function.png":::
99
96
100
97
1. On the **Code + Test** page for the Azure function, select **Get function URL**.
101
98
102
99
1. On the **Get Function URL** pane, use the **Copy** action to copy the desired URL to your clipboard:
103
100
104
-
:::image type="content" source="./media/extend-devtest-labs-azure-functions/function-url.png" border="false" alt-text="Screenshot that shows how to copy the URL for the function in the Azure portal." lightbox="./media/extend-devtest-labs-azure-functions/function-url.png":::
101
+
:::image type="content" source="./media/extend-devtest-labs-azure-functions/function-url.png" alt-text="Screenshot that shows how to copy the URL for the function in the Azure portal." lightbox="./media/extend-devtest-labs-azure-functions/function-url.png":::
105
102
106
103
1. Save the copied URL for later use.
107
104
@@ -124,7 +121,7 @@ In addition to the URL for each function, you also need information about the se
124
121
- ServicePrincipal_Key
125
122
- ServicePrincipal_Tenant
126
123
127
-
:::image type="content" source="./media/extend-devtest-labs-azure-functions/application-settings.png" alt-text="Screenshot that shows how to update the application settings in Visual Studio." lightbox="./media/extend-devtest-labs-azure-functions/application-settings.png" border="false":::
124
+
:::image type="content" source="./media/extend-devtest-labs-azure-functions/application-settings.png" alt-text="Screenshot that shows how to update the application settings in Visual Studio." lightbox="./media/extend-devtest-labs-azure-functions/application-settings.png":::
128
125
129
126
## Test Azure function
130
127
@@ -138,14 +135,12 @@ The last step is to test the Azure function:
138
135
139
136
1. On the **Test / Run** pane, enter values for the route properties: `LABNAME`, `RESOURCEGROUPNAME`, and `SUBSCRIPTIONID`:
140
137
141
-
:::image type="content" source="./media/extend-devtest-labs-azure-functions/test-function.png" alt-text="Screenshot that shows how to enter the property values for the function test." lightbox="./media/extend-devtest-labs-azure-functions/test-function.png" border="false":::
142
-
143
-
1. Select **Run** to execute the function.
138
+
:::image type="content" source="./media/extend-devtest-labs-azure-functions/test-function.png" alt-text="Screenshot that shows how to enter the property values for the function test." lightbox="./media/extend-devtest-labs-azure-functions/test-function.png":::
144
139
145
-
The **Test** functionupdates the internal support page of the specified lab. It also includes an option for users to directly call the function next time:
140
+
1. Select **Run**to execute the function. The function test updates the internal support page of the specified lab. It also includes an option for users to directly call the function next time.
146
141
147
142
## Related content
148
143
149
-
-Review the [DevTest Labs Enterprise Reference Architecture](devtest-lab-reference-architecture.md)
150
-
-[Scale up DevTest Labs](devtest-lab-guidance-scale.md)
0 commit comments