你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Web Apps - Get Function

按网站的 ID 或部署槽位获取函数信息的说明。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}?api-version=2023-12-01

URI 参数

名称 必需 类型 说明
functionName
path True

string

函数名称。

name
path True

string

站点名称。

resourceGroupName
path True

string

资源所属的资源组的名称。

Regex pattern: ^[-\w\._\(\)]+[^\.]$

subscriptionId
path True

string

Azure 订阅 ID。 这是 GUID 格式的字符串 (例如 00000000-0000-0000-0000-0000-0000000000000) 。

api-version
query True

string

API 版本

响应

名称 类型 说明
200 OK

FunctionEnvelope

返回的函数信息。

404 Not Found

名称为 {functionName} 的函数不存在。

Other Status Codes

DefaultErrorResponse

App 服务错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

定义

名称 说明
DefaultErrorResponse

App 服务错误响应。

Details
Error

错误模型。

FunctionEnvelope

函数信息。

DefaultErrorResponse

App 服务错误响应。

名称 类型 说明
error

Error

错误模型。

Details

名称 类型 说明
code

string

用于以编程方式识别错误的标准化字符串。

message

string

详细的错误说明和调试信息。

target

string

详细的错误说明和调试信息。

Error

错误模型。

名称 类型 说明
code

string

用于以编程方式识别错误的标准化字符串。

details

Details[]

详细错误。

innererror

string

调试错误的详细信息。

message

string

详细的错误说明和调试信息。

target

string

详细的错误说明和调试信息。

FunctionEnvelope

函数信息。

名称 类型 说明
id

string

资源 ID。

kind

string

资源类型。

name

string

资源名称。

properties.config

object

配置信息。

properties.config_href

string

配置 URI。

properties.files

object

文件列表。

properties.function_app_id

string

函数应用 ID。

properties.href

string

函数 URI。

properties.invoke_url_template

string

调用 URL

properties.isDisabled

boolean

获取或设置一个值,该值指示是否禁用函数

properties.language

string

函数语言

properties.script_href

string

脚本 URI。

properties.script_root_path_href

string

编写根路径 URI 脚本。

properties.secrets_file_href

string

机密文件 URI。

properties.test_data

string

通过 Azure 门户进行测试时使用的测试数据。

properties.test_data_href

string

测试数据 URI。

type

string

资源类型。