Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.fc.getFunctions
Explore with Pulumi AI
This data source provides the Function Compute functions of the current Alibaba Cloud user.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const functionsDs = alicloud.fc.getFunctions({
serviceName: "sample_service",
nameRegex: "sample_fc_function",
});
export const firstFcFunctionName = functionsDs.then(functionsDs => functionsDs.functions?.[0]?.name);
import pulumi
import pulumi_alicloud as alicloud
functions_ds = alicloud.fc.get_functions(service_name="sample_service",
name_regex="sample_fc_function")
pulumi.export("firstFcFunctionName", functions_ds.functions[0].name)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/fc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
functionsDs, err := fc.GetFunctions(ctx, &fc.GetFunctionsArgs{
ServiceName: "sample_service",
NameRegex: pulumi.StringRef("sample_fc_function"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstFcFunctionName", functionsDs.Functions[0].Name)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var functionsDs = AliCloud.FC.GetFunctions.Invoke(new()
{
ServiceName = "sample_service",
NameRegex = "sample_fc_function",
});
return new Dictionary<string, object?>
{
["firstFcFunctionName"] = functionsDs.Apply(getFunctionsResult => getFunctionsResult.Functions[0]?.Name),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.fc.FcFunctions;
import com.pulumi.alicloud.fc.inputs.GetFunctionsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var functionsDs = FcFunctions.getFunctions(GetFunctionsArgs.builder()
.serviceName("sample_service")
.nameRegex("sample_fc_function")
.build());
ctx.export("firstFcFunctionName", functionsDs.applyValue(getFunctionsResult -> getFunctionsResult.functions()[0].name()));
}
}
variables:
functionsDs:
fn::invoke:
Function: alicloud:fc:getFunctions
Arguments:
serviceName: sample_service
nameRegex: sample_fc_function
outputs:
firstFcFunctionName: ${functionsDs.functions[0].name}
Using getFunctions
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getFunctions(args: GetFunctionsArgs, opts?: InvokeOptions): Promise<GetFunctionsResult>
function getFunctionsOutput(args: GetFunctionsOutputArgs, opts?: InvokeOptions): Output<GetFunctionsResult>
def get_functions(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
service_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetFunctionsResult
def get_functions_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
service_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetFunctionsResult]
func GetFunctions(ctx *Context, args *GetFunctionsArgs, opts ...InvokeOption) (*GetFunctionsResult, error)
func GetFunctionsOutput(ctx *Context, args *GetFunctionsOutputArgs, opts ...InvokeOption) GetFunctionsResultOutput
> Note: This function is named GetFunctions
in the Go SDK.
public static class GetFunctions
{
public static Task<GetFunctionsResult> InvokeAsync(GetFunctionsArgs args, InvokeOptions? opts = null)
public static Output<GetFunctionsResult> Invoke(GetFunctionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetFunctionsResult> getFunctions(GetFunctionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:fc/getFunctions:getFunctions
arguments:
# arguments dictionary
The following arguments are supported:
- Service
Name string - Name of the service that contains the functions to find.
- Ids List<string>
- A list of functions ids.
- Name
Regex string - A regex string to filter results by function name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Service
Name string - Name of the service that contains the functions to find.
- Ids []string
- A list of functions ids.
- Name
Regex string - A regex string to filter results by function name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- service
Name String - Name of the service that contains the functions to find.
- ids List<String>
- A list of functions ids.
- name
Regex String - A regex string to filter results by function name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- service
Name string - Name of the service that contains the functions to find.
- ids string[]
- A list of functions ids.
- name
Regex string - A regex string to filter results by function name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- service_
name str - Name of the service that contains the functions to find.
- ids Sequence[str]
- A list of functions ids.
- name_
regex str - A regex string to filter results by function name.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- service
Name String - Name of the service that contains the functions to find.
- ids List<String>
- A list of functions ids.
- name
Regex String - A regex string to filter results by function name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getFunctions Result
The following output properties are available:
- Functions
List<Pulumi.
Ali Cloud. FC. Outputs. Get Functions Function> - A list of functions. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of functions ids.
- Names List<string>
- A list of functions names.
- Service
Name string - Name
Regex string - Output
File string
- Functions
[]Get
Functions Function - A list of functions. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of functions ids.
- Names []string
- A list of functions names.
- Service
Name string - Name
Regex string - Output
File string
- functions
List<Get
Functions Function> - A list of functions. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of functions ids.
- names List<String>
- A list of functions names.
- service
Name String - name
Regex String - output
File String
- functions
Get
Functions Function[] - A list of functions. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of functions ids.
- names string[]
- A list of functions names.
- service
Name string - name
Regex string - output
File string
- functions
Sequence[Get
Functions Function] - A list of functions. Each element contains the following attributes:
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of functions ids.
- names Sequence[str]
- A list of functions names.
- service_
name str - name_
regex str - output_
file str
- functions List<Property Map>
- A list of functions. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of functions ids.
- names List<String>
- A list of functions names.
- service
Name String - name
Regex String - output
File String
Supporting Types
GetFunctionsFunction
- Ca
Port int - The port that the function listen to, only valid for custom runtime and custom container runtime.
- Code
Checksum string - Checksum (crc64) of the function code.
- Code
Size int - Function code size in bytes.
- Creation
Time string - Function creation time.
- Description string
- Function description.
- Environment
Variables Dictionary<string, object> - A map that defines environment variables for the function.
- Handler string
- Function entry point in the code.
- Id string
- Function ID.
- Initialization
Timeout int - The maximum length of time, in seconds, that the function's initialization should be run for.
- Initializer string
- The entry point of the function's initialization.
- Instance
Concurrency int - The maximum number of requests can be executed concurrently within the single function instance.
- Instance
Type string - The instance type of the function.
- Last
Modification stringTime - Function last modification time.
- Memory
Size int - Amount of memory in MB the function can use at runtime.
- Name string
- Function name.
- Runtime string
- Function runtime. The list of possible values is available here.
- Timeout int
- Maximum amount of time the function can run in seconds.
- Custom
Container Pulumi.Config Ali Cloud. FC. Inputs. Get Functions Function Custom Container Config - The configuration for custom container runtime. It contains following attributes:
- Ca
Port int - The port that the function listen to, only valid for custom runtime and custom container runtime.
- Code
Checksum string - Checksum (crc64) of the function code.
- Code
Size int - Function code size in bytes.
- Creation
Time string - Function creation time.
- Description string
- Function description.
- Environment
Variables map[string]interface{} - A map that defines environment variables for the function.
- Handler string
- Function entry point in the code.
- Id string
- Function ID.
- Initialization
Timeout int - The maximum length of time, in seconds, that the function's initialization should be run for.
- Initializer string
- The entry point of the function's initialization.
- Instance
Concurrency int - The maximum number of requests can be executed concurrently within the single function instance.
- Instance
Type string - The instance type of the function.
- Last
Modification stringTime - Function last modification time.
- Memory
Size int - Amount of memory in MB the function can use at runtime.
- Name string
- Function name.
- Runtime string
- Function runtime. The list of possible values is available here.
- Timeout int
- Maximum amount of time the function can run in seconds.
- Custom
Container GetConfig Functions Function Custom Container Config - The configuration for custom container runtime. It contains following attributes:
- ca
Port Integer - The port that the function listen to, only valid for custom runtime and custom container runtime.
- code
Checksum String - Checksum (crc64) of the function code.
- code
Size Integer - Function code size in bytes.
- creation
Time String - Function creation time.
- description String
- Function description.
- environment
Variables Map<String,Object> - A map that defines environment variables for the function.
- handler String
- Function entry point in the code.
- id String
- Function ID.
- initialization
Timeout Integer - The maximum length of time, in seconds, that the function's initialization should be run for.
- initializer String
- The entry point of the function's initialization.
- instance
Concurrency Integer - The maximum number of requests can be executed concurrently within the single function instance.
- instance
Type String - The instance type of the function.
- last
Modification StringTime - Function last modification time.
- memory
Size Integer - Amount of memory in MB the function can use at runtime.
- name String
- Function name.
- runtime String
- Function runtime. The list of possible values is available here.
- timeout Integer
- Maximum amount of time the function can run in seconds.
- custom
Container GetConfig Functions Function Custom Container Config - The configuration for custom container runtime. It contains following attributes:
- ca
Port number - The port that the function listen to, only valid for custom runtime and custom container runtime.
- code
Checksum string - Checksum (crc64) of the function code.
- code
Size number - Function code size in bytes.
- creation
Time string - Function creation time.
- description string
- Function description.
- environment
Variables {[key: string]: any} - A map that defines environment variables for the function.
- handler string
- Function entry point in the code.
- id string
- Function ID.
- initialization
Timeout number - The maximum length of time, in seconds, that the function's initialization should be run for.
- initializer string
- The entry point of the function's initialization.
- instance
Concurrency number - The maximum number of requests can be executed concurrently within the single function instance.
- instance
Type string - The instance type of the function.
- last
Modification stringTime - Function last modification time.
- memory
Size number - Amount of memory in MB the function can use at runtime.
- name string
- Function name.
- runtime string
- Function runtime. The list of possible values is available here.
- timeout number
- Maximum amount of time the function can run in seconds.
- custom
Container GetConfig Functions Function Custom Container Config - The configuration for custom container runtime. It contains following attributes:
- ca_
port int - The port that the function listen to, only valid for custom runtime and custom container runtime.
- code_
checksum str - Checksum (crc64) of the function code.
- code_
size int - Function code size in bytes.
- creation_
time str - Function creation time.
- description str
- Function description.
- environment_
variables Mapping[str, Any] - A map that defines environment variables for the function.
- handler str
- Function entry point in the code.
- id str
- Function ID.
- initialization_
timeout int - The maximum length of time, in seconds, that the function's initialization should be run for.
- initializer str
- The entry point of the function's initialization.
- instance_
concurrency int - The maximum number of requests can be executed concurrently within the single function instance.
- instance_
type str - The instance type of the function.
- last_
modification_ strtime - Function last modification time.
- memory_
size int - Amount of memory in MB the function can use at runtime.
- name str
- Function name.
- runtime str
- Function runtime. The list of possible values is available here.
- timeout int
- Maximum amount of time the function can run in seconds.
- custom_
container_ Getconfig Functions Function Custom Container Config - The configuration for custom container runtime. It contains following attributes:
- ca
Port Number - The port that the function listen to, only valid for custom runtime and custom container runtime.
- code
Checksum String - Checksum (crc64) of the function code.
- code
Size Number - Function code size in bytes.
- creation
Time String - Function creation time.
- description String
- Function description.
- environment
Variables Map<Any> - A map that defines environment variables for the function.
- handler String
- Function entry point in the code.
- id String
- Function ID.
- initialization
Timeout Number - The maximum length of time, in seconds, that the function's initialization should be run for.
- initializer String
- The entry point of the function's initialization.
- instance
Concurrency Number - The maximum number of requests can be executed concurrently within the single function instance.
- instance
Type String - The instance type of the function.
- last
Modification StringTime - Function last modification time.
- memory
Size Number - Amount of memory in MB the function can use at runtime.
- name String
- Function name.
- runtime String
- Function runtime. The list of possible values is available here.
- timeout Number
- Maximum amount of time the function can run in seconds.
- custom
Container Property MapConfig - The configuration for custom container runtime. It contains following attributes:
GetFunctionsFunctionCustomContainerConfig
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.