Web Apps - Create Function
Description for Create function for web site, or a deployment slot.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}?api-version=2022-03-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
function
|
path | True |
|
Function name. |
|
name
|
path | True |
|
Site name. |
|
resource
|
path | True |
|
Name of the resource group to which the resource belongs. Regex pattern: |
|
subscription
|
path | True |
|
Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). |
|
api-version
|
query | True |
|
API Version |
Request Body
| Name | Type | Description |
|---|---|---|
| kind |
|
Kind of resource. |
| properties.config |
|
Config information. |
| properties.config_href |
|
Config URI. |
| properties.files |
|
File list. |
| properties.function_app_id |
|
Function App ID. |
| properties.href |
|
Function URI. |
| properties.invoke_url_template |
|
The invocation URL |
| properties.isDisabled |
|
Gets or sets a value indicating whether the function is disabled |
| properties.language |
|
The function language |
| properties.script_href |
|
Script URI. |
| properties.script_root_path_href |
|
Script root path URI. |
| properties.secrets_file_href |
|
Secrets file URI. |
| properties.test_data |
|
Test data used when testing via the Azure Portal. |
| properties.test_data_href |
|
Test data URI. |
Responses
| Name | Type | Description |
|---|---|---|
| 201 Created |
Function created. |
|
| 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 |
Definitions
|
Default |
App Service error response. |
| Details | |
| Error |
Error model. |
|
Function |
Function information. |
DefaultErrorResponse
App Service error response.
| Name | Type | Description |
|---|---|---|
| error |
Error model. |
Details
| Name | Type | Description |
|---|---|---|
| code |
|
Standardized string to programmatically identify the error. |
| message |
|
Detailed error description and debugging information. |
| target |
|
Detailed error description and debugging information. |
Error
Error model.
| Name | Type | Description |
|---|---|---|
| code |
|
Standardized string to programmatically identify the error. |
| details |
|
Detailed errors. |
| innererror |
|
More information to debug error. |
| message |
|
Detailed error description and debugging information. |
| target |
|
Detailed error description and debugging information. |
FunctionEnvelope
Function information.
| Name | Type | Description |
|---|---|---|
| id |
|
Resource Id. |
| kind |
|
Kind of resource. |
| name |
|
Resource Name. |
| properties.config |
|
Config information. |
| properties.config_href |
|
Config URI. |
| properties.files |
|
File list. |
| properties.function_app_id |
|
Function App ID. |
| properties.href |
|
Function URI. |
| properties.invoke_url_template |
|
The invocation URL |
| properties.isDisabled |
|
Gets or sets a value indicating whether the function is disabled |
| properties.language |
|
The function language |
| properties.script_href |
|
Script URI. |
| properties.script_root_path_href |
|
Script root path URI. |
| properties.secrets_file_href |
|
Secrets file URI. |
| properties.test_data |
|
Test data used when testing via the Azure Portal. |
| properties.test_data_href |
|
Test data URI. |
| type |
|
Resource type. |