Static Sites - Register User Provided Function App With Static Site
Description for Register a user provided function app with a static site
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}?api-version=2022-03-01
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}?isForced={isForced}&api-version=2022-03-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
function
|
path | True |
string |
Name of the function app to register with the static site. |
name
|
path | True |
string |
Name of the static site. |
resource
|
path | True |
string |
Name of the resource group to which the resource belongs. Regex pattern: |
subscription
|
path | True |
string |
Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). |
api-version
|
query | True |
string |
API Version |
is
|
query |
boolean |
Specify |
Request Body
Name | Type | Description |
---|---|---|
kind |
string |
Kind of resource. |
properties.functionAppRegion |
string |
The region of the function app registered with the static site |
properties.functionAppResourceId |
string |
The resource id of the function app registered with the static site |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK. |
|
202 Accepted |
Asynchronous operation in progress. |
|
Other Status Codes |
App Service error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Register a user provided function app with a static site
Sample Request
PUT https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/userProvidedFunctionApps/testFunctionApp?isForced=true&api-version=2022-03-01
{
"properties": {
"functionAppResourceId": "/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp",
"functionAppRegion": "West US 2"
}
}
Sample Response
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/userProvidedFunctionApps/testFunctionApp",
"name": "testFunctionApp",
"type": "Microsoft.Web/staticSites/builds/userProvidedFunctionApps",
"properties": {
"functionAppResourceId": "/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp",
"functionAppRegion": "West US 2",
"createdOn": "2020-03-04T17:33:11.641Z"
}
}
azure-asyncoperation: https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/locations/westus2/operationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2019-01-01
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/userProvidedFunctionApps/testFunctionApp",
"name": "testFunctionApp",
"type": "Microsoft.Web/staticSites/builds/userProvidedFunctionApps",
"properties": {
"functionAppResourceId": "/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp",
"functionAppRegion": "West US 2",
"createdOn": "2020-03-04T17:33:11.641Z"
}
}
Definitions
Name | Description |
---|---|
Default |
App Service error response. |
Details | |
Error |
Error model. |
Static |
Static Site User Provided Function App ARM resource. |
DefaultErrorResponse
App Service error response.
Name | Type | Description |
---|---|---|
error |
Error model. |
Details
Name | Type | Description |
---|---|---|
code |
string |
Standardized string to programmatically identify the error. |
message |
string |
Detailed error description and debugging information. |
target |
string |
Detailed error description and debugging information. |
Error
Error model.
Name | Type | Description |
---|---|---|
code |
string |
Standardized string to programmatically identify the error. |
details |
Details[] |
Detailed errors. |
innererror |
string |
More information to debug error. |
message |
string |
Detailed error description and debugging information. |
target |
string |
Detailed error description and debugging information. |
StaticSiteUserProvidedFunctionAppARMResource
Static Site User Provided Function App ARM resource.
Name | Type | Description |
---|---|---|
id |
string |
Resource Id. |
kind |
string |
Kind of resource. |
name |
string |
Resource Name. |
properties.createdOn |
string |
The date and time on which the function app was registered with the static site. |
properties.functionAppRegion |
string |
The region of the function app registered with the static site |
properties.functionAppResourceId |
string |
The resource id of the function app registered with the static site |
type |
string |
Resource type. |