GetFunctions

This data source provides the Function Compute functions of the current Alibaba Cloud user.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var functionsDs = Output.Create(AliCloud.FC.GetFunctions.InvokeAsync(new AliCloud.FC.GetFunctionsArgs
        {
            NameRegex = "sample_fc_function",
            ServiceName = "sample_service",
        }));
        this.FirstFcFunctionName = functionsDs.Apply(functionsDs => functionsDs.Functions[0].Name);
    }

    [Output("firstFcFunctionName")]
    public Output<string> FirstFcFunctionName { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

functions_ds = alicloud.fc.get_functions(name_regex="sample_fc_function",
    service_name="sample_service")
pulumi.export("firstFcFunctionName", functions_ds.functions[0]["name"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const functionsDs = pulumi.output(alicloud.fc.getFunctions({
    nameRegex: "sample_fc_function",
    serviceName: "sample_service",
}, { async: true }));

export const firstFcFunctionName = functionsDs.functions[0].name;

Using GetFunctions

function getFunctions(args: GetFunctionsArgs, opts?: InvokeOptions): Promise<GetFunctionsResult>
function  get_functions(ids=None, name_regex=None, output_file=None, service_name=None, opts=None)
func GetFunctions(ctx *Context, args *GetFunctionsArgs, opts ...InvokeOption) (*GetFunctionsResult, error)
public static class GetFunctions {
    public static Task<GetFunctionsResult> InvokeAsync(GetFunctionsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ServiceName string

Name of the service that contains the functions to find.

Ids List<string>
  • A list of functions ids.
NameRegex string

A regex string to filter results by function name.

OutputFile string
ServiceName string

Name of the service that contains the functions to find.

Ids []string
  • A list of functions ids.
NameRegex string

A regex string to filter results by function name.

OutputFile string
serviceName string

Name of the service that contains the functions to find.

ids string[]
  • A list of functions ids.
nameRegex string

A regex string to filter results by function name.

outputFile string
service_name str

Name of the service that contains the functions to find.

ids List[str]
  • A list of functions ids.
name_regex str

A regex string to filter results by function name.

output_file str

GetFunctions Result

The following output properties are available:

Functions List<Pulumi.AliCloud.FC.Outputs.GetFunctionsFunction>

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.

ServiceName string
NameRegex string
OutputFile string
Functions []GetFunctionsFunction

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.

ServiceName string
NameRegex string
OutputFile string
functions GetFunctionsFunction[]

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.

serviceName string
nameRegex string
outputFile string
functions List[GetFunctionsFunction]

A list of functions. Each element contains the following attributes:

id str

The provider-assigned unique ID for this managed resource.

ids List[str]

A list of functions ids.

names List[str]

A list of functions names.

service_name str
name_regex str
output_file str

Supporting Types

GetFunctionsFunction

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

CodeChecksum string

Checksum (crc64) of the function code.

CodeSize int

Function code size in bytes.

CreationTime string

Function creation time.

Description string

Function description.

EnvironmentVariables Dictionary<string, object>

A map that defines environment variables for the function.

Handler string

Function entry point in the code.

Id string

Function ID.

LastModificationTime string

Function last modification time.

MemorySize 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.

CodeChecksum string

Checksum (crc64) of the function code.

CodeSize int

Function code size in bytes.

CreationTime string

Function creation time.

Description string

Function description.

EnvironmentVariables map[string]interface{}

A map that defines environment variables for the function.

Handler string

Function entry point in the code.

Id string

Function ID.

LastModificationTime string

Function last modification time.

MemorySize 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.

codeChecksum string

Checksum (crc64) of the function code.

codeSize number

Function code size in bytes.

creationTime string

Function creation time.

description string

Function description.

environmentVariables {[key: string]: any}

A map that defines environment variables for the function.

handler string

Function entry point in the code.

id string

Function ID.

lastModificationTime string

Function last modification time.

memorySize 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.

codeSize float

Function code size in bytes.

code_checksum str

Checksum (crc64) of the function code.

creation_time str

Function creation time.

description str

Function description.

environment_variables Dict[str, Any]

A map that defines environment variables for the function.

handler str

Function entry point in the code.

id str

Function ID.

lastModificationTime str

Function last modification time.

memory_size float

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 float

Maximum amount of time the function can run in seconds.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.