1. Packages
  2. Ibm Provider
  3. API Docs
  4. FunctionAction
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.FunctionAction

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Create, update, or delete an IBM Cloud Functions action. Actions are stateless code snippets that run on the Cloud Functions platform. An action can be written as a JavaScript, Swift, or Python function, a Java method, or a custom executable program packaged in a Docker container. To bundle and share related actions, use the function_package resource.

    Example Usage

    The sample provides the usage of JavaScript, Node.js, Docker, action sequences, by using ibm.FunctionAction resources.

    Simple JavaScript action

    The following example creates a JavaScript action.

    import * as pulumi from "@pulumi/pulumi";
    import * as fs from "fs";
    import * as ibm from "@pulumi/ibm";
    
    const nodehello = new ibm.FunctionAction("nodehello", {
        namespace: "function-namespace-name",
        exec: {
            kind: "nodejs:10",
            code: fs.readFileSync("hellonode.js", "utf8"),
        },
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    nodehello = ibm.FunctionAction("nodehello",
        namespace="function-namespace-name",
        exec_={
            "kind": "nodejs:10",
            "code": (lambda path: open(path).read())("hellonode.js"),
        })
    
    package main
    
    import (
    	"os"
    
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func readFileOrPanic(path string) pulumi.StringPtrInput {
    	data, err := os.ReadFile(path)
    	if err != nil {
    		panic(err.Error())
    	}
    	return pulumi.String(string(data))
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.NewFunctionAction(ctx, "nodehello", &ibm.FunctionActionArgs{
    			Namespace: pulumi.String("function-namespace-name"),
    			Exec: &ibm.FunctionActionExecArgs{
    				Kind: pulumi.String("nodejs:10"),
    				Code: pulumi.String(readFileOrPanic("hellonode.js")),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var nodehello = new Ibm.FunctionAction("nodehello", new()
        {
            Namespace = "function-namespace-name",
            Exec = new Ibm.Inputs.FunctionActionExecArgs
            {
                Kind = "nodejs:10",
                Code = File.ReadAllText("hellonode.js"),
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.FunctionAction;
    import com.pulumi.ibm.FunctionActionArgs;
    import com.pulumi.ibm.inputs.FunctionActionExecArgs;
    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) {
            var nodehello = new FunctionAction("nodehello", FunctionActionArgs.builder()
                .namespace("function-namespace-name")
                .exec(FunctionActionExecArgs.builder()
                    .kind("nodejs:10")
                    .code(Files.readString(Paths.get("hellonode.js")))
                    .build())
                .build());
    
        }
    }
    
    resources:
      nodehello:
        type: ibm:FunctionAction
        properties:
          namespace: function-namespace-name
          exec:
            kind: nodejs:10
            code:
              fn::readFile: hellonode.js
    

    Passing parameters to an action

    The following example shows how to pass parameters to an action.

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.FunctionAction;
    import com.pulumi.ibm.FunctionActionArgs;
    import com.pulumi.ibm.inputs.FunctionActionExecArgs;
    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) {
            var nodehellowithparameter = new FunctionAction("nodehellowithparameter", FunctionActionArgs.builder()
                .exec(FunctionActionExecArgs.builder()
                    .code("")
                    .file()
    %!v(PANIC=Format method: interface conversion: model.Expression is *model.TemplateExpression, not *model.LiteralValueExpression))
                    .namespace("function-namespace-name")
                    .userDefinedParameters("""
            [
        {
            "key":"place",
            "value":"India"
        }
            ]
    
                    """)
                    .build());
    
            }
    }
    
    resources:
      nodehellowithparameter:
        type: ibm:FunctionAction
        properties:
          exec:
            code: ""
            file:
              - {}
            hellonodewithparameter.js:
              - {}
            kind: nodejs:10
          namespace: function-namespace-name
          userDefinedParameters: |2+
                    [
                {
                    "key":"place",
                    "value":"India"
                }
                    ]
    

    Packaging an action as a Node.js module

    The following example packages a JavaScript action to a module.

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const nodezip = new ibm.FunctionAction("nodezip", {
        exec: {
            codePath: "nodeaction.zip",
            kind: "nodejs:10",
        },
        namespace: "function-namespace-name",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    nodezip = ibm.FunctionAction("nodezip",
        exec_={
            "code_path": "nodeaction.zip",
            "kind": "nodejs:10",
        },
        namespace="function-namespace-name")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.NewFunctionAction(ctx, "nodezip", &ibm.FunctionActionArgs{
    			Exec: &ibm.FunctionActionExecArgs{
    				CodePath: pulumi.String("nodeaction.zip"),
    				Kind:     pulumi.String("nodejs:10"),
    			},
    			Namespace: pulumi.String("function-namespace-name"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var nodezip = new Ibm.FunctionAction("nodezip", new()
        {
            Exec = new Ibm.Inputs.FunctionActionExecArgs
            {
                CodePath = "nodeaction.zip",
                Kind = "nodejs:10",
            },
            Namespace = "function-namespace-name",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.FunctionAction;
    import com.pulumi.ibm.FunctionActionArgs;
    import com.pulumi.ibm.inputs.FunctionActionExecArgs;
    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) {
            var nodezip = new FunctionAction("nodezip", FunctionActionArgs.builder()
                .exec(FunctionActionExecArgs.builder()
                    .codePath("nodeaction.zip")
                    .kind("nodejs:10")
                    .build())
                .namespace("function-namespace-name")
                .build());
    
        }
    }
    
    resources:
      nodezip:
        type: ibm:FunctionAction
        properties:
          exec:
            codePath: nodeaction.zip
            kind: nodejs:10
          namespace: function-namespace-name
    

    Creating action sequences

    The following example creates an action sequence.

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const swifthello = new ibm.FunctionAction("swifthello", {
        exec: {
            components: [
                "/whisk.system/utils/split",
                "/whisk.system/utils/sort",
            ],
            kind: "sequence",
        },
        namespace: "function-namespace-name",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    swifthello = ibm.FunctionAction("swifthello",
        exec_={
            "components": [
                "/whisk.system/utils/split",
                "/whisk.system/utils/sort",
            ],
            "kind": "sequence",
        },
        namespace="function-namespace-name")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.NewFunctionAction(ctx, "swifthello", &ibm.FunctionActionArgs{
    			Exec: &ibm.FunctionActionExecArgs{
    				Components: pulumi.StringArray{
    					pulumi.String("/whisk.system/utils/split"),
    					pulumi.String("/whisk.system/utils/sort"),
    				},
    				Kind: pulumi.String("sequence"),
    			},
    			Namespace: pulumi.String("function-namespace-name"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var swifthello = new Ibm.FunctionAction("swifthello", new()
        {
            Exec = new Ibm.Inputs.FunctionActionExecArgs
            {
                Components = new[]
                {
                    "/whisk.system/utils/split",
                    "/whisk.system/utils/sort",
                },
                Kind = "sequence",
            },
            Namespace = "function-namespace-name",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.FunctionAction;
    import com.pulumi.ibm.FunctionActionArgs;
    import com.pulumi.ibm.inputs.FunctionActionExecArgs;
    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) {
            var swifthello = new FunctionAction("swifthello", FunctionActionArgs.builder()
                .exec(FunctionActionExecArgs.builder()
                    .components(                
                        "/whisk.system/utils/split",
                        "/whisk.system/utils/sort")
                    .kind("sequence")
                    .build())
                .namespace("function-namespace-name")
                .build());
    
        }
    }
    
    resources:
      swifthello:
        type: ibm:FunctionAction
        properties:
          exec:
            components:
              - /whisk.system/utils/split
              - /whisk.system/utils/sort
            kind: sequence
          namespace: function-namespace-name
    

    Creating Docker actions

    The following example creates a Docker action.

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.FunctionAction;
    import com.pulumi.ibm.FunctionActionArgs;
    import com.pulumi.ibm.inputs.FunctionActionExecArgs;
    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) {
            var swifthello = new FunctionAction("swifthello", FunctionActionArgs.builder()
                .exec(FunctionActionExecArgs.builder()
                    .code("")
                    .file()
    %!v(PANIC=Format method: interface conversion: model.Expression is *model.TemplateExpression, not *model.LiteralValueExpression))
                    .namespace("function-namespace-name")
                    .build());
    
            }
    }
    
    resources:
      swifthello:
        type: ibm:FunctionAction
        properties:
          exec:
            code: ""
            file:
              - {}
            helloSwift.swift:
              - {}
            image: janesmith/blackboxdemo
            kind: blackbox
          namespace: function-namespace-name
    

    Create FunctionAction Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new FunctionAction(name: string, args: FunctionActionArgs, opts?: CustomResourceOptions);
    @overload
    def FunctionAction(resource_name: str,
                       args: FunctionActionArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def FunctionAction(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       exec_: Optional[FunctionActionExecArgs] = None,
                       namespace: Optional[str] = None,
                       function_action_id: Optional[str] = None,
                       limits: Optional[FunctionActionLimitsArgs] = None,
                       name: Optional[str] = None,
                       publish: Optional[bool] = None,
                       user_defined_annotations: Optional[str] = None,
                       user_defined_parameters: Optional[str] = None)
    func NewFunctionAction(ctx *Context, name string, args FunctionActionArgs, opts ...ResourceOption) (*FunctionAction, error)
    public FunctionAction(string name, FunctionActionArgs args, CustomResourceOptions? opts = null)
    public FunctionAction(String name, FunctionActionArgs args)
    public FunctionAction(String name, FunctionActionArgs args, CustomResourceOptions options)
    
    type: ibm:FunctionAction
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args FunctionActionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args FunctionActionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args FunctionActionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FunctionActionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FunctionActionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var functionActionResource = new Ibm.FunctionAction("functionActionResource", new()
    {
        Exec = new Ibm.Inputs.FunctionActionExecArgs
        {
            Kind = "string",
            Code = "string",
            CodePath = "string",
            Components = new[]
            {
                "string",
            },
            Image = "string",
            Init = "string",
            Main = "string",
        },
        Namespace = "string",
        FunctionActionId = "string",
        Limits = new Ibm.Inputs.FunctionActionLimitsArgs
        {
            LogSize = 0,
            Memory = 0,
            Timeout = 0,
        },
        Name = "string",
        Publish = false,
        UserDefinedAnnotations = "string",
        UserDefinedParameters = "string",
    });
    
    example, err := ibm.NewFunctionAction(ctx, "functionActionResource", &ibm.FunctionActionArgs{
    	Exec: &ibm.FunctionActionExecArgs{
    		Kind:     pulumi.String("string"),
    		Code:     pulumi.String("string"),
    		CodePath: pulumi.String("string"),
    		Components: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Image: pulumi.String("string"),
    		Init:  pulumi.String("string"),
    		Main:  pulumi.String("string"),
    	},
    	Namespace:        pulumi.String("string"),
    	FunctionActionId: pulumi.String("string"),
    	Limits: &ibm.FunctionActionLimitsArgs{
    		LogSize: pulumi.Float64(0),
    		Memory:  pulumi.Float64(0),
    		Timeout: pulumi.Float64(0),
    	},
    	Name:                   pulumi.String("string"),
    	Publish:                pulumi.Bool(false),
    	UserDefinedAnnotations: pulumi.String("string"),
    	UserDefinedParameters:  pulumi.String("string"),
    })
    
    var functionActionResource = new FunctionAction("functionActionResource", FunctionActionArgs.builder()
        .exec(FunctionActionExecArgs.builder()
            .kind("string")
            .code("string")
            .codePath("string")
            .components("string")
            .image("string")
            .init("string")
            .main("string")
            .build())
        .namespace("string")
        .functionActionId("string")
        .limits(FunctionActionLimitsArgs.builder()
            .logSize(0)
            .memory(0)
            .timeout(0)
            .build())
        .name("string")
        .publish(false)
        .userDefinedAnnotations("string")
        .userDefinedParameters("string")
        .build());
    
    function_action_resource = ibm.FunctionAction("functionActionResource",
        exec_={
            "kind": "string",
            "code": "string",
            "code_path": "string",
            "components": ["string"],
            "image": "string",
            "init": "string",
            "main": "string",
        },
        namespace="string",
        function_action_id="string",
        limits={
            "log_size": 0,
            "memory": 0,
            "timeout": 0,
        },
        name="string",
        publish=False,
        user_defined_annotations="string",
        user_defined_parameters="string")
    
    const functionActionResource = new ibm.FunctionAction("functionActionResource", {
        exec: {
            kind: "string",
            code: "string",
            codePath: "string",
            components: ["string"],
            image: "string",
            init: "string",
            main: "string",
        },
        namespace: "string",
        functionActionId: "string",
        limits: {
            logSize: 0,
            memory: 0,
            timeout: 0,
        },
        name: "string",
        publish: false,
        userDefinedAnnotations: "string",
        userDefinedParameters: "string",
    });
    
    type: ibm:FunctionAction
    properties:
        exec:
            code: string
            codePath: string
            components:
                - string
            image: string
            init: string
            kind: string
            main: string
        functionActionId: string
        limits:
            logSize: 0
            memory: 0
            timeout: 0
        name: string
        namespace: string
        publish: false
        userDefinedAnnotations: string
        userDefinedParameters: string
    

    FunctionAction Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The FunctionAction resource accepts the following input properties:

    Exec FunctionActionExec

    A nested block to describe executable binaries.

    Nested scheme for exec:

    Namespace string
    The name of the function namespace.
    FunctionActionId string
    (String) The ID of the new action.
    Limits FunctionActionLimits

    A nested block to describe assigned limits.

    Nested scheme for limits:

    Name string
    The name of the action.
    Publish bool
    Action visibility.
    UserDefinedAnnotations string
    Annotations defined in key value format.
    UserDefinedParameters string
    Parameters defined in key value format. Parameter bindings included in the context passed to the action. Cloud Function backend/API.
    Exec FunctionActionExecArgs

    A nested block to describe executable binaries.

    Nested scheme for exec:

    Namespace string
    The name of the function namespace.
    FunctionActionId string
    (String) The ID of the new action.
    Limits FunctionActionLimitsArgs

    A nested block to describe assigned limits.

    Nested scheme for limits:

    Name string
    The name of the action.
    Publish bool
    Action visibility.
    UserDefinedAnnotations string
    Annotations defined in key value format.
    UserDefinedParameters string
    Parameters defined in key value format. Parameter bindings included in the context passed to the action. Cloud Function backend/API.
    exec FunctionActionExec

    A nested block to describe executable binaries.

    Nested scheme for exec:

    namespace String
    The name of the function namespace.
    functionActionId String
    (String) The ID of the new action.
    limits FunctionActionLimits

    A nested block to describe assigned limits.

    Nested scheme for limits:

    name String
    The name of the action.
    publish Boolean
    Action visibility.
    userDefinedAnnotations String
    Annotations defined in key value format.
    userDefinedParameters String
    Parameters defined in key value format. Parameter bindings included in the context passed to the action. Cloud Function backend/API.
    exec FunctionActionExec

    A nested block to describe executable binaries.

    Nested scheme for exec:

    namespace string
    The name of the function namespace.
    functionActionId string
    (String) The ID of the new action.
    limits FunctionActionLimits

    A nested block to describe assigned limits.

    Nested scheme for limits:

    name string
    The name of the action.
    publish boolean
    Action visibility.
    userDefinedAnnotations string
    Annotations defined in key value format.
    userDefinedParameters string
    Parameters defined in key value format. Parameter bindings included in the context passed to the action. Cloud Function backend/API.
    exec_ FunctionActionExecArgs

    A nested block to describe executable binaries.

    Nested scheme for exec:

    namespace str
    The name of the function namespace.
    function_action_id str
    (String) The ID of the new action.
    limits FunctionActionLimitsArgs

    A nested block to describe assigned limits.

    Nested scheme for limits:

    name str
    The name of the action.
    publish bool
    Action visibility.
    user_defined_annotations str
    Annotations defined in key value format.
    user_defined_parameters str
    Parameters defined in key value format. Parameter bindings included in the context passed to the action. Cloud Function backend/API.
    exec Property Map

    A nested block to describe executable binaries.

    Nested scheme for exec:

    namespace String
    The name of the function namespace.
    functionActionId String
    (String) The ID of the new action.
    limits Property Map

    A nested block to describe assigned limits.

    Nested scheme for limits:

    name String
    The name of the action.
    publish Boolean
    Action visibility.
    userDefinedAnnotations String
    Annotations defined in key value format.
    userDefinedParameters String
    Parameters defined in key value format. Parameter bindings included in the context passed to the action. Cloud Function backend/API.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FunctionAction resource produces the following output properties:

    ActionId string
    (String) The action ID.
    Annotations string
    (List) All annotations to describe the action, including those set by you or by IBM Cloud Functions.
    Id string
    The provider-assigned unique ID for this managed resource.
    Parameters string
    (List) All parameters passed to the action when the action is invoked, including those set by you or by the IBM Cloud Functions.
    TargetEndpointUrl string
    (String) The target endpoint URL of the action.
    Version string
    (String) Semantic version of the item.
    ActionId string
    (String) The action ID.
    Annotations string
    (List) All annotations to describe the action, including those set by you or by IBM Cloud Functions.
    Id string
    The provider-assigned unique ID for this managed resource.
    Parameters string
    (List) All parameters passed to the action when the action is invoked, including those set by you or by the IBM Cloud Functions.
    TargetEndpointUrl string
    (String) The target endpoint URL of the action.
    Version string
    (String) Semantic version of the item.
    actionId String
    (String) The action ID.
    annotations String
    (List) All annotations to describe the action, including those set by you or by IBM Cloud Functions.
    id String
    The provider-assigned unique ID for this managed resource.
    parameters String
    (List) All parameters passed to the action when the action is invoked, including those set by you or by the IBM Cloud Functions.
    targetEndpointUrl String
    (String) The target endpoint URL of the action.
    version String
    (String) Semantic version of the item.
    actionId string
    (String) The action ID.
    annotations string
    (List) All annotations to describe the action, including those set by you or by IBM Cloud Functions.
    id string
    The provider-assigned unique ID for this managed resource.
    parameters string
    (List) All parameters passed to the action when the action is invoked, including those set by you or by the IBM Cloud Functions.
    targetEndpointUrl string
    (String) The target endpoint URL of the action.
    version string
    (String) Semantic version of the item.
    action_id str
    (String) The action ID.
    annotations str
    (List) All annotations to describe the action, including those set by you or by IBM Cloud Functions.
    id str
    The provider-assigned unique ID for this managed resource.
    parameters str
    (List) All parameters passed to the action when the action is invoked, including those set by you or by the IBM Cloud Functions.
    target_endpoint_url str
    (String) The target endpoint URL of the action.
    version str
    (String) Semantic version of the item.
    actionId String
    (String) The action ID.
    annotations String
    (List) All annotations to describe the action, including those set by you or by IBM Cloud Functions.
    id String
    The provider-assigned unique ID for this managed resource.
    parameters String
    (List) All parameters passed to the action when the action is invoked, including those set by you or by the IBM Cloud Functions.
    targetEndpointUrl String
    (String) The target endpoint URL of the action.
    version String
    (String) Semantic version of the item.

    Look up Existing FunctionAction Resource

    Get an existing FunctionAction resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: FunctionActionState, opts?: CustomResourceOptions): FunctionAction
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action_id: Optional[str] = None,
            annotations: Optional[str] = None,
            exec_: Optional[FunctionActionExecArgs] = None,
            function_action_id: Optional[str] = None,
            limits: Optional[FunctionActionLimitsArgs] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            parameters: Optional[str] = None,
            publish: Optional[bool] = None,
            target_endpoint_url: Optional[str] = None,
            user_defined_annotations: Optional[str] = None,
            user_defined_parameters: Optional[str] = None,
            version: Optional[str] = None) -> FunctionAction
    func GetFunctionAction(ctx *Context, name string, id IDInput, state *FunctionActionState, opts ...ResourceOption) (*FunctionAction, error)
    public static FunctionAction Get(string name, Input<string> id, FunctionActionState? state, CustomResourceOptions? opts = null)
    public static FunctionAction get(String name, Output<String> id, FunctionActionState state, CustomResourceOptions options)
    resources:  _:    type: ibm:FunctionAction    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ActionId string
    (String) The action ID.
    Annotations string
    (List) All annotations to describe the action, including those set by you or by IBM Cloud Functions.
    Exec FunctionActionExec

    A nested block to describe executable binaries.

    Nested scheme for exec:

    FunctionActionId string
    (String) The ID of the new action.
    Limits FunctionActionLimits

    A nested block to describe assigned limits.

    Nested scheme for limits:

    Name string
    The name of the action.
    Namespace string
    The name of the function namespace.
    Parameters string
    (List) All parameters passed to the action when the action is invoked, including those set by you or by the IBM Cloud Functions.
    Publish bool
    Action visibility.
    TargetEndpointUrl string
    (String) The target endpoint URL of the action.
    UserDefinedAnnotations string
    Annotations defined in key value format.
    UserDefinedParameters string
    Parameters defined in key value format. Parameter bindings included in the context passed to the action. Cloud Function backend/API.
    Version string
    (String) Semantic version of the item.
    ActionId string
    (String) The action ID.
    Annotations string
    (List) All annotations to describe the action, including those set by you or by IBM Cloud Functions.
    Exec FunctionActionExecArgs

    A nested block to describe executable binaries.

    Nested scheme for exec:

    FunctionActionId string
    (String) The ID of the new action.
    Limits FunctionActionLimitsArgs

    A nested block to describe assigned limits.

    Nested scheme for limits:

    Name string
    The name of the action.
    Namespace string
    The name of the function namespace.
    Parameters string
    (List) All parameters passed to the action when the action is invoked, including those set by you or by the IBM Cloud Functions.
    Publish bool
    Action visibility.
    TargetEndpointUrl string
    (String) The target endpoint URL of the action.
    UserDefinedAnnotations string
    Annotations defined in key value format.
    UserDefinedParameters string
    Parameters defined in key value format. Parameter bindings included in the context passed to the action. Cloud Function backend/API.
    Version string
    (String) Semantic version of the item.
    actionId String
    (String) The action ID.
    annotations String
    (List) All annotations to describe the action, including those set by you or by IBM Cloud Functions.
    exec FunctionActionExec

    A nested block to describe executable binaries.

    Nested scheme for exec:

    functionActionId String
    (String) The ID of the new action.
    limits FunctionActionLimits

    A nested block to describe assigned limits.

    Nested scheme for limits:

    name String
    The name of the action.
    namespace String
    The name of the function namespace.
    parameters String
    (List) All parameters passed to the action when the action is invoked, including those set by you or by the IBM Cloud Functions.
    publish Boolean
    Action visibility.
    targetEndpointUrl String
    (String) The target endpoint URL of the action.
    userDefinedAnnotations String
    Annotations defined in key value format.
    userDefinedParameters String
    Parameters defined in key value format. Parameter bindings included in the context passed to the action. Cloud Function backend/API.
    version String
    (String) Semantic version of the item.
    actionId string
    (String) The action ID.
    annotations string
    (List) All annotations to describe the action, including those set by you or by IBM Cloud Functions.
    exec FunctionActionExec

    A nested block to describe executable binaries.

    Nested scheme for exec:

    functionActionId string
    (String) The ID of the new action.
    limits FunctionActionLimits

    A nested block to describe assigned limits.

    Nested scheme for limits:

    name string
    The name of the action.
    namespace string
    The name of the function namespace.
    parameters string
    (List) All parameters passed to the action when the action is invoked, including those set by you or by the IBM Cloud Functions.
    publish boolean
    Action visibility.
    targetEndpointUrl string
    (String) The target endpoint URL of the action.
    userDefinedAnnotations string
    Annotations defined in key value format.
    userDefinedParameters string
    Parameters defined in key value format. Parameter bindings included in the context passed to the action. Cloud Function backend/API.
    version string
    (String) Semantic version of the item.
    action_id str
    (String) The action ID.
    annotations str
    (List) All annotations to describe the action, including those set by you or by IBM Cloud Functions.
    exec_ FunctionActionExecArgs

    A nested block to describe executable binaries.

    Nested scheme for exec:

    function_action_id str
    (String) The ID of the new action.
    limits FunctionActionLimitsArgs

    A nested block to describe assigned limits.

    Nested scheme for limits:

    name str
    The name of the action.
    namespace str
    The name of the function namespace.
    parameters str
    (List) All parameters passed to the action when the action is invoked, including those set by you or by the IBM Cloud Functions.
    publish bool
    Action visibility.
    target_endpoint_url str
    (String) The target endpoint URL of the action.
    user_defined_annotations str
    Annotations defined in key value format.
    user_defined_parameters str
    Parameters defined in key value format. Parameter bindings included in the context passed to the action. Cloud Function backend/API.
    version str
    (String) Semantic version of the item.
    actionId String
    (String) The action ID.
    annotations String
    (List) All annotations to describe the action, including those set by you or by IBM Cloud Functions.
    exec Property Map

    A nested block to describe executable binaries.

    Nested scheme for exec:

    functionActionId String
    (String) The ID of the new action.
    limits Property Map

    A nested block to describe assigned limits.

    Nested scheme for limits:

    name String
    The name of the action.
    namespace String
    The name of the function namespace.
    parameters String
    (List) All parameters passed to the action when the action is invoked, including those set by you or by the IBM Cloud Functions.
    publish Boolean
    Action visibility.
    targetEndpointUrl String
    (String) The target endpoint URL of the action.
    userDefinedAnnotations String
    Annotations defined in key value format.
    userDefinedParameters String
    Parameters defined in key value format. Parameter bindings included in the context passed to the action. Cloud Function backend/API.
    version String
    (String) Semantic version of the item.

    Supporting Types

    FunctionActionExec, FunctionActionExecArgs

    Kind string
    The type of action. You can find supported kinds in the IBM Cloud Functions Docs.
    Code string
    The code to execute, when not using the blackbox executable. Note Conflicts with exec.components, exec.code_path.
    CodePath string
    When not using the blackbox executable, the file path of code to execute and supports only .zip extension to create the action. Note Conflicts with exec.components, exec.code.
    Components List<string>
    The list of fully qualified actions. Note Conflicts with exec.code, exec.image, exec.code.path.
    Image string
    When using the blackbox executable, the name of the container image name. Note Conflicts with exec.components.
    Init string
    When using nodejs, the optional archive reference. Note Conflicts with exec.components, exec.image.
    Main string
    The name of the action entry point (function or fully-qualified method name, when applicable). Note Conflicts with exec.components, exec.image.
    Kind string
    The type of action. You can find supported kinds in the IBM Cloud Functions Docs.
    Code string
    The code to execute, when not using the blackbox executable. Note Conflicts with exec.components, exec.code_path.
    CodePath string
    When not using the blackbox executable, the file path of code to execute and supports only .zip extension to create the action. Note Conflicts with exec.components, exec.code.
    Components []string
    The list of fully qualified actions. Note Conflicts with exec.code, exec.image, exec.code.path.
    Image string
    When using the blackbox executable, the name of the container image name. Note Conflicts with exec.components.
    Init string
    When using nodejs, the optional archive reference. Note Conflicts with exec.components, exec.image.
    Main string
    The name of the action entry point (function or fully-qualified method name, when applicable). Note Conflicts with exec.components, exec.image.
    kind String
    The type of action. You can find supported kinds in the IBM Cloud Functions Docs.
    code String
    The code to execute, when not using the blackbox executable. Note Conflicts with exec.components, exec.code_path.
    codePath String
    When not using the blackbox executable, the file path of code to execute and supports only .zip extension to create the action. Note Conflicts with exec.components, exec.code.
    components List<String>
    The list of fully qualified actions. Note Conflicts with exec.code, exec.image, exec.code.path.
    image String
    When using the blackbox executable, the name of the container image name. Note Conflicts with exec.components.
    init String
    When using nodejs, the optional archive reference. Note Conflicts with exec.components, exec.image.
    main String
    The name of the action entry point (function or fully-qualified method name, when applicable). Note Conflicts with exec.components, exec.image.
    kind string
    The type of action. You can find supported kinds in the IBM Cloud Functions Docs.
    code string
    The code to execute, when not using the blackbox executable. Note Conflicts with exec.components, exec.code_path.
    codePath string
    When not using the blackbox executable, the file path of code to execute and supports only .zip extension to create the action. Note Conflicts with exec.components, exec.code.
    components string[]
    The list of fully qualified actions. Note Conflicts with exec.code, exec.image, exec.code.path.
    image string
    When using the blackbox executable, the name of the container image name. Note Conflicts with exec.components.
    init string
    When using nodejs, the optional archive reference. Note Conflicts with exec.components, exec.image.
    main string
    The name of the action entry point (function or fully-qualified method name, when applicable). Note Conflicts with exec.components, exec.image.
    kind str
    The type of action. You can find supported kinds in the IBM Cloud Functions Docs.
    code str
    The code to execute, when not using the blackbox executable. Note Conflicts with exec.components, exec.code_path.
    code_path str
    When not using the blackbox executable, the file path of code to execute and supports only .zip extension to create the action. Note Conflicts with exec.components, exec.code.
    components Sequence[str]
    The list of fully qualified actions. Note Conflicts with exec.code, exec.image, exec.code.path.
    image str
    When using the blackbox executable, the name of the container image name. Note Conflicts with exec.components.
    init str
    When using nodejs, the optional archive reference. Note Conflicts with exec.components, exec.image.
    main str
    The name of the action entry point (function or fully-qualified method name, when applicable). Note Conflicts with exec.components, exec.image.
    kind String
    The type of action. You can find supported kinds in the IBM Cloud Functions Docs.
    code String
    The code to execute, when not using the blackbox executable. Note Conflicts with exec.components, exec.code_path.
    codePath String
    When not using the blackbox executable, the file path of code to execute and supports only .zip extension to create the action. Note Conflicts with exec.components, exec.code.
    components List<String>
    The list of fully qualified actions. Note Conflicts with exec.code, exec.image, exec.code.path.
    image String
    When using the blackbox executable, the name of the container image name. Note Conflicts with exec.components.
    init String
    When using nodejs, the optional archive reference. Note Conflicts with exec.components, exec.image.
    main String
    The name of the action entry point (function or fully-qualified method name, when applicable). Note Conflicts with exec.components, exec.image.

    FunctionActionLimits, FunctionActionLimitsArgs

    LogSize double
    The maximum log size for the action, specified in megabyte. Default value is 10.
    Memory double
    The maximum memory for the action, specified in megabyte. Default value is 256.
    Timeout double
    The timeout limit to terminate the action, specified in milliseconds. Default value is 60000.
    LogSize float64
    The maximum log size for the action, specified in megabyte. Default value is 10.
    Memory float64
    The maximum memory for the action, specified in megabyte. Default value is 256.
    Timeout float64
    The timeout limit to terminate the action, specified in milliseconds. Default value is 60000.
    logSize Double
    The maximum log size for the action, specified in megabyte. Default value is 10.
    memory Double
    The maximum memory for the action, specified in megabyte. Default value is 256.
    timeout Double
    The timeout limit to terminate the action, specified in milliseconds. Default value is 60000.
    logSize number
    The maximum log size for the action, specified in megabyte. Default value is 10.
    memory number
    The maximum memory for the action, specified in megabyte. Default value is 256.
    timeout number
    The timeout limit to terminate the action, specified in milliseconds. Default value is 60000.
    log_size float
    The maximum log size for the action, specified in megabyte. Default value is 10.
    memory float
    The maximum memory for the action, specified in megabyte. Default value is 256.
    timeout float
    The timeout limit to terminate the action, specified in milliseconds. Default value is 60000.
    logSize Number
    The maximum log size for the action, specified in megabyte. Default value is 10.
    memory Number
    The maximum memory for the action, specified in megabyte. Default value is 256.
    timeout Number
    The timeout limit to terminate the action, specified in milliseconds. Default value is 60000.

    Import

    The ibm_function_action resource can be imported by using the namespace and action ID.

    Syntax

    $ pulumi import ibm:index/functionAction:FunctionAction nodeAction <namespace>:<action_id>
    

    Example

    $ pulumi import ibm:index/functionAction:FunctionAction nodeAction Namespace-01:nodezip
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud