All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::FC::Functions

Last Updated:Oct 29, 2024

DATASOURCE::FC::Functions is used to query functions.

Syntax

{
  "Type": "DATASOURCE::FC::Functions",
  "Properties": {
    "ServiceName": String,
    "Qualifier": String,
    "Prefix": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
ServiceNameStringYesYesThe name of the service. None.
QualifierStringNoYesThe version or alias of the service. None.
PrefixStringNoYesThe prefix of the resource name. The resource name must be prefixed with the value of this property.

Return values (Fn::GetAtt)

  • Functions: the functions.
  • FunctionNames: the names of the functions.
PropertyTypeDescriptionConstraint
FunctionNamesListThe names of the functions. None.
FunctionsListThe functions. None.
FunctionNameStringThe name of the function. None.
FunctionIdStringThe ID of the function. The ID is globally unique.
DescriptionStringThe description of the function. None.
RuntimeStringThe runtime environment of the function. The following runtime environments are supported: Node.js 6.x, Node.js 8.x, Node.js 10.x, Node.js 12.x, Node.js 14.x, Python 2.7, Python 3, Java 8, Java 11, PHP 7.2, .NET Core 2.1, Go 1.x, Custom Runtime, and Custom Container.

For more information about the runtime environments that are supported by Function Compute, see Manage functions.

HandlerStringThe handler of the function. The format of the value varies based on the programming language that you use.

For more information, see Basics.

TimeoutNumberThe timeout period for the execution of the function. Valid values: 1 to 86400.

Default value: 60.

Unit: seconds.

When this period expires, the execution of the function is terminated.

InitializerStringThe handler of the initializer function. The format of the value varies based on the programming language that you use.

For more information, see Basics.

InitializationTimeoutNumberThe timeout period for the execution of the initializer function. Valid values: 1 to 300.

Default value: 3.

Unit: seconds.

When this period expires, the execution of the initializer function is terminated.

CodeSizeNumberThe size of the function code package. Unit: bytes.
CodeChecksumStringThe CRC-64 value of the function code package. None.
MemorySizeNumberThe memory size of the function. Unit: MB.

The memory size must be a multiple of 64 MB.

The memory size that is available for a function varies based on the instance type.

For more information, see Instance specifications.
GpuMemorySizeNumberThe GPU virtual memory capacity for the function. None.
EnvironmentVariablesMapThe environment variables that are specified for the function. You can obtain the values of the environment variables from the function.

For more information, see Environment variables.

CreatedTimeStringThe time when the function was created. None.
LastModifiedTimeStringThe time when the function was last modified. None.
InstanceConcurrencyNumberThe number of requests that can be concurrently processed by a single instance. None.
InstanceSoftConcurrencyNumberThe number of requests that can be concurrently processed by multiple instances. None.
CustomContainerConfigMapThe configurations of the custom container runtime. After you configure the custom container runtime, Function Compute can execute the function in a container created from a custom image. For more information, see CustomContainerConfig.
CaPortNumberThe port on which the HTTP server listens for the custom runtime or custom container runtime. None.
InstanceTypeStringThe instance type of the function. None.
LayersMapThe information about layers. For more information, see Layer.
InstanceLifecycleConfigMapThe configuration of the instance lifecycle function. For more information, see InstanceLifecycleConfig.
CustomDNSMapThe custom Domain Name System (DNS) settings of the function. For more information, see CustomDNS.
CustomRuntimeConfigMapThe configurations of the custom runtime function. For more information, see CustomRuntimeConfig.

Examples

  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ServiceName": {
          "Type": "String",
          "Description": "Service name."
        }
      },
      "Resources": {
        "Functions": {
          "Type": "DATASOURCE::FC::Functions",
          "Properties": {
            "ServiceName": {
              "Ref": "ServiceName"
            }
          }
        }
      },
      "Outputs": {
        "Functions": {
          "Description": "The list of functions.",
          "Value": {
            "Fn::GetAtt": [
              "Functions",
              "Functions"
            ]
          }
        },
        "FunctionNames": {
          "Description": "The list of function names.",
          "Value": {
            "Fn::GetAtt": [
              "Functions",
              "FunctionNames"
            ]
          }
        }
      }
    }
  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ServiceName:
        Type: String
        Description: Service name.
    Resources:
      Functions:
        Type: DATASOURCE::FC::Functions
        Properties:
          ServiceName:
            Ref: ServiceName
    Outputs:
      Functions:
        Description: The list of functions.
        Value:
          Fn::GetAtt:
            - Functions
            - Functions
      FunctionNames:
        Description: The list of function names.
        Value:
          Fn::GetAtt:
            - Functions
            - FunctionNames