赛尔校园公共服务平台 Logo
平台使用
阿里云
百度云
移动云
智算服务
教育生态
登录 →
赛尔校园公共服务平台 Logo
平台使用 阿里云 百度云 移动云 智算服务 教育生态
登录
  1. 首页
  2. 阿里云
  3. 函数计算 FC 3.0
  4. 开发参考
  5. API参考
  6. API目录
  7. 函数
  8. ListFunctions - 列出函数

ListFunctions - 列出函数

  • 函数
  • 发布于 2025-04-16
  • 0 次阅读
文档编辑
文档编辑

获取函数列表。

接口说明

执行 ListFunctions 仅返回函数属性的一部分字段,如果需要获取某个函数的更多属性的字段,包括 state、stateReasonCode、stateReason、lastUpdateStatus、lastUpdateStatusReasonCode 和 lastUpdateStatusReason,请使用 GetFunction 。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用前面加 * 表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
fc:ListFunctionslist
*全部资源
*
    无
无

请求语法

GET /2023-03-30/functions HTTP/1.1

请求参数

名称类型必填描述示例值
prefixstring否

函数名称前缀。

my-func
nextTokenstring否

分页起始标记。

MTIzNCNhYmM=
limitinteger否

返回函数的数量,最小值为 1,最大值为 100。

10
fcVersionstring否

函数所属的版本。

  • v3:只列出 FC3.0 的函数。
  • v2:只列出 FC2.0 的函数。

默认不填,即列出 FC3.0 和 FC2.0 的函数。

v3
tagsarray否

需要过滤的函数标签。

Tag否

函数绑定的标签信息。

runtimestring否

需要过滤的函数运行时。

python3.10
gpuTypestring否

需要过滤的函数 GPU 卡型。

fc.gpu.tesla.1
descriptionstring否

需要过滤的函数描述。

test_description

返回参数

名称类型描述示例值
ListFunctionsOutput

函数列表

示例

正常返回示例

JSON格式

{
  "functions": [
    {
      "handler": "index.handler",
      "lastModifiedTime": "2023-05-01T08:15:27Z",
      "role": "acs:ram::188077086902****:role/fc-test",
      "disableOndemand": true,
      "tracingConfig": {
        "params": {
          "key": "http://tracing-analysis-dc-hz.aliyuncs.com/adapt_xxx/api/otlp/traces"
        },
        "type": "Jaeger"
      },
      "lastUpdateStatusReasonCode": "ImageOptimizing",
      "nasConfig": {
        "groupId": 100,
        "mountPoints": [
          {
            "enableTLS": true,
            "mountDir": "/home/test",
            "serverAddr": "***-uni85.cn-hangzhou.nas.com:/"
          }
        ],
        "userId": 100
      },
      "description": "my function",
      "stateReasonCode": "Creating",
      "stateReason": "Function creating",
      "codeSize": 412,
      "timeout": 60,
      "codeChecksum": "2825179536350****",
      "diskSize": 512,
      "functionId": "aa715851-1c20-4b89-a8fb-***",
      "lastUpdateStatusReason": "The system is currently processing the acceleration optimization for the image.",
      "internetAccess": true,
      "layers": [
        {
          "arn": "acs:fc:cn-beijing:186824xxxxxx:layers/fc_layer/versions/1",
          "size": 421
        }
      ],
      "ossMountConfig": {
        "mountPoints": [
          {
            "bucketName": "my-bucket",
            "bucketPath": "/my-dir",
            "endpoint": "http://oss-cn-shanghai.aliyuncs.com",
            "mountDir": "/mnt/dir",
            "readOnly": true
          }
        ]
      },
      "createdTime": "2023-04-01T08:15:27Z",
      "state": "Pending",
      "functionArn": "acs:fc:cn-shanghai:123:functions/functionName",
      "customRuntimeConfig": {
        "args": [
          "arg1"
        ],
        "command": [
          "/code/bootstrap"
        ],
        "healthCheckConfig": {
          "failureThreshold": 1,
          "httpGetUrl": "/ready",
          "initialDelaySeconds": 1,
          "periodSeconds": 1,
          "successThreshold": 2,
          "timeoutSeconds": 2
        },
        "port": 9000
      },
      "logConfig": {
        "enableInstanceMetrics": true,
        "enableRequestMetrics": true,
        "logBeginRule": "DefaultRegex",
        "logstore": "test-logstore",
        "project": "test-project"
      },
      "functionName": "my-function-1",
      "instanceLifecycleConfig": {
        "initializer": {
          "handler": "index.initializer",
          "timeout": 10
        },
        "preStop": {
          "handler": "index.initializer",
          "timeout": 10
        }
      },
      "gpuConfig": {
        "gpuMemorySize": 2048,
        "gpuType": "fc.gpu.tesla.1"
      },
      "cpu": 1,
      "runtime": "python3.10",
      "customContainerConfig": {
        "accelerationInfo": {
          "status": "Ready"
        },
        "accelerationType": "Default",
        "acrInstanceId": "cri-xxxxxxxxxx",
        "command": [
          "arg1"
        ],
        "entrypoint": [
          "/code/bootstrap"
        ],
        "healthCheckConfig": {
          "failureThreshold": 1,
          "httpGetUrl": "/ready",
          "initialDelaySeconds": 1,
          "periodSeconds": 1,
          "successThreshold": 2,
          "timeoutSeconds": 2
        },
        "image": "registry-vpc.cn-hangzhou.aliyuncs.com/fc-demo/helloworld:v1beta1",
        "port": 9000,
        "registryConfig": {
          "authConfig": {
            "password": "abc***",
            "userName": "admin"
          },
          "certConfig": {
            "insecure": true,
            "rootCaCertBase64": "cm9vdF9jYV9jZXJ0"
          },
          "networkConfig": {
            "securityGroupId": "sg-xxxxxxxxxxxxxx",
            "vSwitchId": "vsw-xxxxxxxxxxxxxx",
            "vpcId": "vpc-xxxxxxxxxxxxxx"
          }
        },
        "resolvedImageUri": "stand-sh-registry-vpc.cn-shanghai.cr.aliyuncs.com/fc-demo2/springboot-helloworld@sha256:68d1****0d64d6"
      },
      "instanceConcurrency": 1,
      "tags": [
        {
          "Key": "k1",
          "Value": "v1"
        }
      ],
      "invocationRestriction": {
        "reason": "",
        "lastModifiedTime": "",
        "disable": true
      },
      "memorySize": 512,
      "customDNS": {
        "dnsOptions": [
          {
            "name": "ndots",
            "value": "2"
          }
        ],
        "nameServers": [
          "8.8.x.x"
        ],
        "searches": [
          "ns1.svc.cluster-domain.example"
        ]
      },
      "environmentVariables": {
        "key": "value1"
      },
      "lastUpdateStatus": "InProgress",
      "vpcConfig": {
        "securityGroupId": "sg-bp18hj1wtxgy3b0***",
        "vSwitchIds": [
          "vsw-bp1ozpcrdc6r****"
        ],
        "vpcId": "vpc-***",
        "role": "acs:ram::188077086902****:role/fc-test"
      }
    }
  ],
  "nextToken": "next_function_name"
}

错误码

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2024-08-22API 内部配置变更,不影响调用查看变更详情
2024-08-22OpenAPI 入参发生变更查看变更详情
2024-06-14OpenAPI 去除了 deprecated 标记查看变更详情
2024-02-22API 内部配置变更,不影响调用查看变更详情
2023-08-30OpenAPI 描述信息更新查看变更详情
2023-08-30OpenAPI 描述信息更新、OpenAPI 返回结构发生变更查看变更详情
2023-06-28新增 OpenAPI查看变更详情
相关文章

DeleteFunctionVersion - 删除函数版本 2025-04-16 14:38

删除函数版本。

GetFunctionCode - 获取函数代码 2025-04-16 14:38

获取函数代码包的详情。

ListFunctionVersions - 列出函数版本 2025-04-16 14:38

查询指定函数的版本列表。

PublishFunctionVersion - 发布函数版本 2025-04-16 14:38

发布函数版本。

CreateFunction - 创建函数 2025-04-16 14:38

调用CreateFunction接口创建函数。 接口说明

DeleteFunction - 删除函数 2025-04-16 14:38

删除函数。

目录
Copyright © 2025 your company All Rights Reserved. Powered by 赛尔网络.
京ICP备14022346号-15
gongan beian 京公网安备11010802041014号