类 CfcClient


  • public class CfcClient
    extends AbstractBceClient
    Provides the client for accessing the Cloud Function Compute Service.
    • 构造器详细资料

      • CfcClient

        public CfcClient()
        Constructs a new client to invoke service methods on CFC
      • CfcClient

        public CfcClient​(BceClientConfiguration clientConfiguration)
        Constructs a new client using the client configuration to access CFC services.
        参数:
        clientConfiguration - The client configuration options controlling how this client connects to Document services (e.g. proxy settings, retry counts, etc).
    • 方法详细资料

      • createFunction

        public CreateFunctionResponse createFunction​(CreateFunctionRequest request)
        Create a new function
        参数:
        request - The request containing user-defined function information
        返回:
        Result of the createFunction operation returned by the service
      • listFunctions

        public ListFunctionsResponse listFunctions​(String functionVersion,
                                                   Integer marker,
                                                   Integer maxItems)
        Get user function list
        参数:
        functionVersion - (Optional) Specify the version of the function. If no function returns the $LATEST version of the function, the optional valid value ALL will return all versions, including $LATEST
        marker - (Optional) marker
        maxItems - (Optional) 1-10000
        返回:
      • getFunction

        public GetFunctionResponse getFunction​(String functionName,
                                               String qualifier)
        Get function information
        参数:
        functionName - (Required) Function Name You can specify a function name (for example, Thumbnail), or you can specify the function's BRN resource name (for example, brn:bce:cfc:bj:account-id: function:thumbnail:$LATEST). CFC also allows you to specify a partial BRN (for example, account-id:Thumbnail). Note that the BRN length is limited to 1-170. If only the function name is specified, the length is limited to 64 characters.
        qualifier - (optional) Function Alias Use this optional parameter to specify a function version or alias. If you specify a function version, the API will use the qualified function BRN to request and return information about the specific CFC function version. If you specify an alias, the API returns information about the version of the function pointed to by the alias. If you don't provide this parameter, the API returns information about the CFC function $LATEST
        返回:
      • deleteFunction

        public DeleteFunctionResponse deleteFunction​(String functionName,
                                                     String qualifier)
        Delete function
        参数:
        functionName - (Required) Function name
        qualifier - (optional) Function alias
        返回:
      • getFunctionConfiguration

        public GetFunctionConfigurationResponse getFunctionConfiguration​(String functionName,
                                                                         String qualifier)
        Get function configuration
        参数:
        functionName - (Required) Function name
        qualifier - (Optional) Function alias
        返回:
      • listVersionsByFunction

        public ListVersionsByFunctionResponse listVersionsByFunction​(String functionName,
                                                                     Integer marker,
                                                                     Integer maxItems)
        Get function version list
        参数:
        functionName - (Required) Function name
        marker - (Optional) Function marker
        maxItems - (Optional) MaxItems 1-10000
        返回:
      • createAlias

        public CreateAliasResponse createAlias​(String functionName,
                                               String functionVersion,
                                               String name,
                                               String description)
        Create function alias
        参数:
        functionName - Function name
        functionVersion - Function version
        name - Alias, uppercase and lowercase letters, numbers, and -_/. special characters, must start with a letter and be limited to 64 characters in length
        description - Alias description
        返回:
        Alias information
      • getAlias

        public GetAliasResponse getAlias​(String aliasName,
                                         String functionName)
        Get function alias
        参数:
        aliasName - Alias name
        functionName - Function name
        返回:
      • updateAlias

        public UpdateAliasResponse updateAlias​(String functionName,
                                               String functionVersion,
                                               String aliasName,
                                               String description)
        Update alias
        参数:
        functionName - Function name
        functionVersion - Function version
        aliasName - Alias name
        description - Alias description
        返回:
      • deleteAlias

        public DeleteAliasResponse deleteAlias​(String functionName,
                                               String aliasName)
        Delete function alias
        参数:
        functionName - Function name
        aliasName - Alias name
        返回:
      • listTriggers

        public ListTriggersResponse listTriggers​(String functionBrn)
        Get trigger list
        参数:
        functionBrn - Function BRN
        返回:
      • createTrigger

        public CreateTriggerResponse createTrigger​(String target,
                                                   String source,
                                                   Map<String,​String> data)
        Create trigger
        参数:
        target - Function BRN
        source - Trigger source
        data - Trigger parameter configuration
        返回:
      • updateTrigger

        public UpdateTriggerResponse updateTrigger​(String relationId,
                                                   String target,
                                                   String source,
                                                   Map<String,​String> data)
        Update trigger
        参数:
        relationId - Trigger ID
        target - Function BRN
        source - Trigger source
        data - Trigger parameter configuration
        返回:
      • deleteTrigger

        public DeleteTriggerResponse deleteTrigger​(String target,
                                                   String source,
                                                   String relationId)
        Delete trigger
        参数:
        target - Function BRN
        source - Trigger source
        relationId - Trigger ID
        返回:
      • invoke

        public InvokeResponse invoke​(String functionName,
                                     String invocationType,
                                     String logType,
                                     String qualifier,
                                     byte[] payload)
        Invoke function
        参数:
        functionName - Function name or function BRN
        invocationType - Call mode Event (asynchronous call) returns 202/RequestResponse (sync return) / DryRun (test function). Default ResauestResponse
        logType - Log type Tail / None You can set this optional parameter to Tail, provided the InvocationType parameter must be RequestResponse
        qualifier - Function version or function alias
        payload -
        返回: