DATASOURCE::FC::Functions is used to query functions.
Syntax
{
"Type": "DATASOURCE::FC::Functions",
"Properties": {
"ServiceName": String,
"Qualifier": String,
"Prefix": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
ServiceName | String | Yes | Yes | The name of the service. | None |
Qualifier | String | No | Yes | The version or alias of the service. | None |
Prefix | String | No | Yes | The prefix of the resource name. | The resource name must be prefixed with the value of this property. |
Response parameters (Fn::GetAtt)
- Functions: the information about functions.
- FunctionNames: the names of functions.
Parameter | Type | Description | Constraint |
---|---|---|---|
FunctionNames | List | The names of functions. | None |
Functions | List | The information about functions. | None |
FunctionName | String | The name of the function. | None |
FunctionId | String | The ID of the function. | The ID must be globally unique. |
Description | String | The description of the function. | None |
Runtime | String | The 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 runtimes , and custom container runtimes .
For more information about the runtime environments that are supported by Function Compute, see Supported runtime environments. |
Handler | String | The handler of the function. | The format of the value varies based on the programming language that you use.
For more information, see Basics. |
Timeout | Number | The 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. |
Initializer | String | The handler of the initializer function. | The format of the value varies based on the programming language that you use.
For more information, see Basics. |
InitializationTimeout | Number | The 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. |
CodeSize | Number | The size of the function code package. | Unit: byte. |
CodeChecksum | String | The CRC-64 value of the function code package. | None |
MemorySize | Number | The memory capacity for the function. | Unit: MB.
The memory capacity must be a multiple of 64 MB. The memory capacity that is available for an instance varies based on the instance type. For more information, see Instance specifications. |
GpuMemorySize | Number | The GPU virtual memory capacity for the function. | None |
EnvironmentVariables | Map | The environment variables configured for the function. | You can obtain the values of the environment variables from the function.
For more information, see Environment variables. |
CreatedTime | String | The time when the function was created. | None |
LastModifiedTime | String | The time when the function was last modified. | None |
InstanceConcurrency | Number | The number of requests that can be concurrently processed by a single instance. | None |
InstanceSoftConcurrency | Number | The number of requests that can be concurrently processed by multiple instances. | None |
CustomContainerConfig | Map | The 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. |
CaPort | Number | The port on which the HTTP server listens for the custom runtime or custom container runtime. | None |
InstanceType | String | The instance type of the function. | None |
Layers | Map | The information about layers. | For more information, see Layer. |
InstanceLifecycleConfig | Map | The lifecycle configurations of the instance. | For more information, see InstanceLifecycleConfig. |
CustomDNS | Map | The custom Domain Name System (DNS) settings of the function. | For more information, see CustomDNS. |
CustomRuntimeConfig | Map | The configurations of the custom runtime. | 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"
]
}
}
}
}