文档首页 > > 开发指南> API & SDK 对应关系> Java> FGS

FGS

分享
更新时间: 2019/11/15 GMT+08:00

基于FGS v1.0 JAVA API的SDK接口如下,调用方式请参考示例代码。

Resource

Method

API

Functions

FunctionMetadata.Functions listFunction(int marker, int maxItems)

GET /v1.0/{project_id}/fss/functions?marker={marker}&maxitems={maxitems}

FunctionMetadata getFunctionMetadata(String function_urn)

GET /v1.0/{project_id}/fss/functions/{function_urn}/config

FunctionMetadata getFunctionCode(String function_urn)

GET /v1.0/{project_id}/fss/functions/{function_urn}/code

FunctionMetadata createFunction(FunctionMetadata functionMetadata)

POST /v1.0/{project_id}/fss/functions

ActionResponse deleteFunction(String function_urn)

DELETE /v1.0/{project_id}/fss/functions/{function_urn}

FunctionMetadata updateFunctionCode(String function_urn, FunctionMetadata functionMetadata)

PUT /v1.0/{project_id}/fss/functions/{function_urn}/code

FunctionMetadata updateFunctionConfig(String function_urn, FunctionMetadata functionMetadata)

PUT /v1.0/{project_id}/fss/functions/{function_urn}/config

String invokeFunction(String function_urn, Map<?, ?> data)

POST /v1.0/{project_id}/fss/functions/{function_urn}/invocations

String asyncInvokeFunction(String function_urn, Map<?, ?> data)

POST /v1.0/{project_id}/fss/functions/{function_urn}/invocations-async

Versions

FunctionMetadata PublishVersion(String function_urn, FunctionMetadata fmd);

POST /v1.0/{project_id}/fss/functions/{function_urn}/versions

FunctionMetadata.FunctionVersions listFunctionVersions(String function_urn, int marker, int maxItems)

GET /v1.0/{project_id}/fss/functions/{function_urn}/versions?marker={marker}&maxitems={maxitems}

FunctionVersionAlias createVersionAlias(String function_urn, FunctionVersionAlias functionVersionAlias)

POST /v1.0/{project_id}/fss/functions/{function_urn}/aliases

FunctionVersionAlias updateVersionAlias (String function_urn, FunctionVersionAlias functionVersionAlias)

PUT /v1.0/{project_id}/fss/functions/{function_urn}/aliases/{alias_name}

void DeleteVersionAlias(String function_urn, String alias_name);

DELETE /v1.0/{project_id}/fss/functions/{function_urn}/aliases/{alias_name}

FunctionVersionAlias GetVersionAlias(String function_urn, String alias_name);

GET /v1.0/{project_id}/fss/functions/{function_urn}/aliases/{alias_name}

List<FunctionVersionAlias> ListVersionAlias(String function_urn)

GET /v1.0/{project_id}/fss/functions/{function_urn}/aliases

Triggers

FunctionTrigger[] listTriggersForFunction(String function_urn)

GET /v1.0/{project_id}/fss/triggers/{function_urn}

FunctionTriggers CreateTriggerInstance(String function_urn, FunctionTriggers functionTriggers)

POST /v1.0/{project_id}/fss/triggers/{function_urn}

void DeleteTrigger(String function_urn, String trigger_type_code, String trigger_id)

DELETE /v1.0/{project_id}/fss/triggers/{function_urn}/{trigger_type_code}/{trigger_id}

FunctionTriggers<?> GetTriggerInstance(String function_urn, String trigger_type_code, String trigger_id)

GET /v1.0/{project_id}/fss/triggers/{function_urn}/{trigger_type_code}/{trigger_id}

void DeleteAllTriggersForFunction(String function_urn);

DELETE /v1.0/{project_id}/fss/triggers/{function_urn}

基于FGS v2.0 JAVA API的SDK接口如下,调用方式请参考示例代码。

Resource

Method

API

Functions

FunctionMetadata.Functions listFunction(int marker, int maxItems)

GET /v2/{project_id}/fgs/functions?marker={marker}&maxitems={maxitems}

FunctionMetadata.Functions listFunction()

GET /v2/{project_id}/fgs/functions

FunctionMetadata getFunctionMetadata(String function_urn)

GET /v2/{project_id}/fgs/functions/{function_urn}/config

FunctionMetadata getFunctionCode(String function_urn)

GET /v2/{project_id}/fgs/functions/{function_urn}/code

FunctionMetadata createFunction(FunctionMetadata functionMetadata)

POST /v2/{project_id}/fgs/functions

ActionResponse deleteFunction(String function_urn)

DELETE /v2/{project_id}/fgs/functions/{function_urn}

FunctionMetadata updateFunctionCode(String function_urn, FunctionMetadata functionMetadata)

PUT /v2/{project_id}/fgs/functions/{function_urn}/code

FunctionMetadata updateFunctionConfig(String function_urn, FunctionMetadata functionMetadata)

PUT /v2/{project_id}/fgs/functions/{function_urn}/config

FunctionMetadata createFunctionVersion(String function_urn, FunctionMetadata fmd);

POST /v2/{project_id}/fgs/functions/{function_urn}/versions

FunctionMetadata.FunctionVersions listFunctionVersion(String function_urn, int marker, int maxItems)

GET /v2/{project_id}/fgs/functions/{function_urn}/versions?marker={marker}&maxitems={maxitems}

FunctionMetadata.FunctionVersions listFunctionVersion(String function_urn)

GET /v2/{project_id}/fgs/functions/{function_urn}/versions

FuncInvocations invokeFunction(String function_urn, Map<?, ?> data)

POST /v2/{project_id}/fgs/functions/{function_urn}/invocations

FuncInvocations asyncInvokeFunction(String function_urn, Map<?, ?> data)

POST /v2/{project_id}/fgs/functions/{function_urn}/invocations-async

Versions

FunctionVersionAlias createVersionAlias(String function_urn, FunctionVersionAlias functionVersionAlias)

POST /v2/{project_id}/fgs/functions/{function_urn}/aliases

FunctionVersionAlias updateVersionAlias (String function_urn, FunctionVersionAlias functionVersionAlias)

PUT /v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}

ActionResponse deleteVersionAlias(String function_urn, String alias_name);

DELETE /v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}

FunctionVersionAlias getVersionAlias(String function_urn, String alias_name);

GET /v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}

List<FunctionVersionAlias> listVersionAlias(String function_urn)

GET /v2/{project_id}/fgs/functions/{function_urn}/aliases

Triggers

FunctionTrigger[] listTriggersForFunction(String function_urn)

GET /v2/{project_id}/fgs/triggers/{function_urn}

FunctionTriggers createTriggerInstance(String function_urn, FunctionTriggers functionTriggers)

POST /v2/{project_id}/fgs/triggers/{function_urn}

ActionResponse deleteTrigger(String function_urn, String trigger_type_code, String trigger_id)

DELETE /v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}

FunctionTriggers<?> getTriggerInstance(String function_urn, String trigger_type_code, String trigger_id)

GET /v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}

ActionResponse deleteAllTriggersForFunction(String function_urn);

DELETE /v2/{project_id}/fgs/triggers/{function_urn}

分享:

    相关文档

    相关产品

文档是否有解决您的问题?

提交成功!

非常感谢您的反馈,我们会继续努力做到更好!

反馈提交失败,请稍后再试!

*必选

请至少选择或填写一项反馈信息

字符长度不能超过200

提交反馈 取消

如您有其它疑问,您也可以通过华为云社区问答频道来与我们联系探讨

跳转到云社区