1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Functions
  5. InvokeFunction
Oracle Cloud Infrastructure v1.24.0 published on Thursday, Feb 22, 2024 by Pulumi

oci.Functions.InvokeFunction

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.24.0 published on Thursday, Feb 22, 2024 by Pulumi

    This resource provides the Invoke Function resource in Oracle Cloud Infrastructure Functions service.

    Invokes a function

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testInvokeFunction = new Oci.Functions.InvokeFunction("testInvokeFunction", new()
        {
            FunctionId = oci_functions_function.Test_function.Id,
            InvokeFunctionBody = @var.Invoke_function_invoke_function_body,
            FnIntent = @var.Invoke_function_fn_intent,
            FnInvokeType = @var.Invoke_function_fn_invoke_type,
            Base64EncodeContent = false,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Functions"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Functions.NewInvokeFunction(ctx, "testInvokeFunction", &Functions.InvokeFunctionArgs{
    			FunctionId:          pulumi.Any(oci_functions_function.Test_function.Id),
    			InvokeFunctionBody:  pulumi.Any(_var.Invoke_function_invoke_function_body),
    			FnIntent:            pulumi.Any(_var.Invoke_function_fn_intent),
    			FnInvokeType:        pulumi.Any(_var.Invoke_function_fn_invoke_type),
    			Base64EncodeContent: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Functions.InvokeFunction;
    import com.pulumi.oci.Functions.InvokeFunctionArgs;
    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 testInvokeFunction = new InvokeFunction("testInvokeFunction", InvokeFunctionArgs.builder()        
                .functionId(oci_functions_function.test_function().id())
                .invokeFunctionBody(var_.invoke_function_invoke_function_body())
                .fnIntent(var_.invoke_function_fn_intent())
                .fnInvokeType(var_.invoke_function_fn_invoke_type())
                .base64EncodeContent(false)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_oci as oci
    
    test_invoke_function = oci.functions.InvokeFunction("testInvokeFunction",
        function_id=oci_functions_function["test_function"]["id"],
        invoke_function_body=var["invoke_function_invoke_function_body"],
        fn_intent=var["invoke_function_fn_intent"],
        fn_invoke_type=var["invoke_function_fn_invoke_type"],
        base64_encode_content=False)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testInvokeFunction = new oci.functions.InvokeFunction("testInvokeFunction", {
        functionId: oci_functions_function.test_function.id,
        invokeFunctionBody: _var.invoke_function_invoke_function_body,
        fnIntent: _var.invoke_function_fn_intent,
        fnInvokeType: _var.invoke_function_fn_invoke_type,
        base64EncodeContent: false,
    });
    
    resources:
      testInvokeFunction:
        type: oci:Functions:InvokeFunction
        properties:
          #Required
          functionId: ${oci_functions_function.test_function.id}
          #Optional
          invokeFunctionBody: ${var.invoke_function_invoke_function_body}
          fnIntent: ${var.invoke_function_fn_intent}
          fnInvokeType: ${var.invoke_function_fn_invoke_type}
          base64EncodeContent: false
    

    Create InvokeFunction Resource

    new InvokeFunction(name: string, args: InvokeFunctionArgs, opts?: CustomResourceOptions);
    @overload
    def InvokeFunction(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       base64_encode_content: Optional[bool] = None,
                       fn_intent: Optional[str] = None,
                       fn_invoke_type: Optional[str] = None,
                       function_id: Optional[str] = None,
                       input_body_source_path: Optional[str] = None,
                       invoke_function_body: Optional[str] = None,
                       invoke_function_body_base64_encoded: Optional[str] = None)
    @overload
    def InvokeFunction(resource_name: str,
                       args: InvokeFunctionArgs,
                       opts: Optional[ResourceOptions] = None)
    func NewInvokeFunction(ctx *Context, name string, args InvokeFunctionArgs, opts ...ResourceOption) (*InvokeFunction, error)
    public InvokeFunction(string name, InvokeFunctionArgs args, CustomResourceOptions? opts = null)
    public InvokeFunction(String name, InvokeFunctionArgs args)
    public InvokeFunction(String name, InvokeFunctionArgs args, CustomResourceOptions options)
    
    type: oci:Functions:InvokeFunction
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args InvokeFunctionArgs
    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 InvokeFunctionArgs
    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 InvokeFunctionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InvokeFunctionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InvokeFunctionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    InvokeFunction Resource Properties

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

    Inputs

    The InvokeFunction resource accepts the following input properties:

    FunctionId string
    The OCID of this function.
    Base64EncodeContent bool
    FnIntent string
    An optional intent header that indicates to the FDK the way the event should be interpreted. E.g. 'httprequest', 'cloudevent'.
    FnInvokeType string
    Indicates whether Oracle Functions should execute the request and return the result ('sync') of the execution, or whether Oracle Functions should return as soon as processing has begun ('detached') and leave result handling to the function.
    InputBodySourcePath string

    An absolute path to a file on the local system that contains the input to be provided to the function. Cannot be defined if invoke_function_body or invoke_function_body_base64_encoded is defined. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    InvokeFunctionBody string
    The body of the function invocation. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit. Cannot be defined if input_body_source_path or invoke_function_body_base64_encoded is defined.
    InvokeFunctionBodyBase64Encoded string
    FunctionId string
    The OCID of this function.
    Base64EncodeContent bool
    FnIntent string
    An optional intent header that indicates to the FDK the way the event should be interpreted. E.g. 'httprequest', 'cloudevent'.
    FnInvokeType string
    Indicates whether Oracle Functions should execute the request and return the result ('sync') of the execution, or whether Oracle Functions should return as soon as processing has begun ('detached') and leave result handling to the function.
    InputBodySourcePath string

    An absolute path to a file on the local system that contains the input to be provided to the function. Cannot be defined if invoke_function_body or invoke_function_body_base64_encoded is defined. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    InvokeFunctionBody string
    The body of the function invocation. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit. Cannot be defined if input_body_source_path or invoke_function_body_base64_encoded is defined.
    InvokeFunctionBodyBase64Encoded string
    functionId String
    The OCID of this function.
    base64EncodeContent Boolean
    fnIntent String
    An optional intent header that indicates to the FDK the way the event should be interpreted. E.g. 'httprequest', 'cloudevent'.
    fnInvokeType String
    Indicates whether Oracle Functions should execute the request and return the result ('sync') of the execution, or whether Oracle Functions should return as soon as processing has begun ('detached') and leave result handling to the function.
    inputBodySourcePath String

    An absolute path to a file on the local system that contains the input to be provided to the function. Cannot be defined if invoke_function_body or invoke_function_body_base64_encoded is defined. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    invokeFunctionBody String
    The body of the function invocation. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit. Cannot be defined if input_body_source_path or invoke_function_body_base64_encoded is defined.
    invokeFunctionBodyBase64Encoded String
    functionId string
    The OCID of this function.
    base64EncodeContent boolean
    fnIntent string
    An optional intent header that indicates to the FDK the way the event should be interpreted. E.g. 'httprequest', 'cloudevent'.
    fnInvokeType string
    Indicates whether Oracle Functions should execute the request and return the result ('sync') of the execution, or whether Oracle Functions should return as soon as processing has begun ('detached') and leave result handling to the function.
    inputBodySourcePath string

    An absolute path to a file on the local system that contains the input to be provided to the function. Cannot be defined if invoke_function_body or invoke_function_body_base64_encoded is defined. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    invokeFunctionBody string
    The body of the function invocation. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit. Cannot be defined if input_body_source_path or invoke_function_body_base64_encoded is defined.
    invokeFunctionBodyBase64Encoded string
    function_id str
    The OCID of this function.
    base64_encode_content bool
    fn_intent str
    An optional intent header that indicates to the FDK the way the event should be interpreted. E.g. 'httprequest', 'cloudevent'.
    fn_invoke_type str
    Indicates whether Oracle Functions should execute the request and return the result ('sync') of the execution, or whether Oracle Functions should return as soon as processing has begun ('detached') and leave result handling to the function.
    input_body_source_path str

    An absolute path to a file on the local system that contains the input to be provided to the function. Cannot be defined if invoke_function_body or invoke_function_body_base64_encoded is defined. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    invoke_function_body str
    The body of the function invocation. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit. Cannot be defined if input_body_source_path or invoke_function_body_base64_encoded is defined.
    invoke_function_body_base64_encoded str
    functionId String
    The OCID of this function.
    base64EncodeContent Boolean
    fnIntent String
    An optional intent header that indicates to the FDK the way the event should be interpreted. E.g. 'httprequest', 'cloudevent'.
    fnInvokeType String
    Indicates whether Oracle Functions should execute the request and return the result ('sync') of the execution, or whether Oracle Functions should return as soon as processing has begun ('detached') and leave result handling to the function.
    inputBodySourcePath String

    An absolute path to a file on the local system that contains the input to be provided to the function. Cannot be defined if invoke_function_body or invoke_function_body_base64_encoded is defined. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    invokeFunctionBody String
    The body of the function invocation. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit. Cannot be defined if input_body_source_path or invoke_function_body_base64_encoded is defined.
    invokeFunctionBodyBase64Encoded String

    Outputs

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

    Content string
    Content of the response string, if any. If base64_encode_content is set to true, then this content will be base64 encoded.
    Id string
    The provider-assigned unique ID for this managed resource.
    InvokeEndpoint string
    Content string
    Content of the response string, if any. If base64_encode_content is set to true, then this content will be base64 encoded.
    Id string
    The provider-assigned unique ID for this managed resource.
    InvokeEndpoint string
    content String
    Content of the response string, if any. If base64_encode_content is set to true, then this content will be base64 encoded.
    id String
    The provider-assigned unique ID for this managed resource.
    invokeEndpoint String
    content string
    Content of the response string, if any. If base64_encode_content is set to true, then this content will be base64 encoded.
    id string
    The provider-assigned unique ID for this managed resource.
    invokeEndpoint string
    content str
    Content of the response string, if any. If base64_encode_content is set to true, then this content will be base64 encoded.
    id str
    The provider-assigned unique ID for this managed resource.
    invoke_endpoint str
    content String
    Content of the response string, if any. If base64_encode_content is set to true, then this content will be base64 encoded.
    id String
    The provider-assigned unique ID for this managed resource.
    invokeEndpoint String

    Look up Existing InvokeFunction Resource

    Get an existing InvokeFunction 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?: InvokeFunctionState, opts?: CustomResourceOptions): InvokeFunction
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            base64_encode_content: Optional[bool] = None,
            content: Optional[str] = None,
            fn_intent: Optional[str] = None,
            fn_invoke_type: Optional[str] = None,
            function_id: Optional[str] = None,
            input_body_source_path: Optional[str] = None,
            invoke_endpoint: Optional[str] = None,
            invoke_function_body: Optional[str] = None,
            invoke_function_body_base64_encoded: Optional[str] = None) -> InvokeFunction
    func GetInvokeFunction(ctx *Context, name string, id IDInput, state *InvokeFunctionState, opts ...ResourceOption) (*InvokeFunction, error)
    public static InvokeFunction Get(string name, Input<string> id, InvokeFunctionState? state, CustomResourceOptions? opts = null)
    public static InvokeFunction get(String name, Output<String> id, InvokeFunctionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Base64EncodeContent bool
    Content string
    Content of the response string, if any. If base64_encode_content is set to true, then this content will be base64 encoded.
    FnIntent string
    An optional intent header that indicates to the FDK the way the event should be interpreted. E.g. 'httprequest', 'cloudevent'.
    FnInvokeType string
    Indicates whether Oracle Functions should execute the request and return the result ('sync') of the execution, or whether Oracle Functions should return as soon as processing has begun ('detached') and leave result handling to the function.
    FunctionId string
    The OCID of this function.
    InputBodySourcePath string

    An absolute path to a file on the local system that contains the input to be provided to the function. Cannot be defined if invoke_function_body or invoke_function_body_base64_encoded is defined. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    InvokeEndpoint string
    InvokeFunctionBody string
    The body of the function invocation. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit. Cannot be defined if input_body_source_path or invoke_function_body_base64_encoded is defined.
    InvokeFunctionBodyBase64Encoded string
    Base64EncodeContent bool
    Content string
    Content of the response string, if any. If base64_encode_content is set to true, then this content will be base64 encoded.
    FnIntent string
    An optional intent header that indicates to the FDK the way the event should be interpreted. E.g. 'httprequest', 'cloudevent'.
    FnInvokeType string
    Indicates whether Oracle Functions should execute the request and return the result ('sync') of the execution, or whether Oracle Functions should return as soon as processing has begun ('detached') and leave result handling to the function.
    FunctionId string
    The OCID of this function.
    InputBodySourcePath string

    An absolute path to a file on the local system that contains the input to be provided to the function. Cannot be defined if invoke_function_body or invoke_function_body_base64_encoded is defined. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    InvokeEndpoint string
    InvokeFunctionBody string
    The body of the function invocation. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit. Cannot be defined if input_body_source_path or invoke_function_body_base64_encoded is defined.
    InvokeFunctionBodyBase64Encoded string
    base64EncodeContent Boolean
    content String
    Content of the response string, if any. If base64_encode_content is set to true, then this content will be base64 encoded.
    fnIntent String
    An optional intent header that indicates to the FDK the way the event should be interpreted. E.g. 'httprequest', 'cloudevent'.
    fnInvokeType String
    Indicates whether Oracle Functions should execute the request and return the result ('sync') of the execution, or whether Oracle Functions should return as soon as processing has begun ('detached') and leave result handling to the function.
    functionId String
    The OCID of this function.
    inputBodySourcePath String

    An absolute path to a file on the local system that contains the input to be provided to the function. Cannot be defined if invoke_function_body or invoke_function_body_base64_encoded is defined. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    invokeEndpoint String
    invokeFunctionBody String
    The body of the function invocation. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit. Cannot be defined if input_body_source_path or invoke_function_body_base64_encoded is defined.
    invokeFunctionBodyBase64Encoded String
    base64EncodeContent boolean
    content string
    Content of the response string, if any. If base64_encode_content is set to true, then this content will be base64 encoded.
    fnIntent string
    An optional intent header that indicates to the FDK the way the event should be interpreted. E.g. 'httprequest', 'cloudevent'.
    fnInvokeType string
    Indicates whether Oracle Functions should execute the request and return the result ('sync') of the execution, or whether Oracle Functions should return as soon as processing has begun ('detached') and leave result handling to the function.
    functionId string
    The OCID of this function.
    inputBodySourcePath string

    An absolute path to a file on the local system that contains the input to be provided to the function. Cannot be defined if invoke_function_body or invoke_function_body_base64_encoded is defined. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    invokeEndpoint string
    invokeFunctionBody string
    The body of the function invocation. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit. Cannot be defined if input_body_source_path or invoke_function_body_base64_encoded is defined.
    invokeFunctionBodyBase64Encoded string
    base64_encode_content bool
    content str
    Content of the response string, if any. If base64_encode_content is set to true, then this content will be base64 encoded.
    fn_intent str
    An optional intent header that indicates to the FDK the way the event should be interpreted. E.g. 'httprequest', 'cloudevent'.
    fn_invoke_type str
    Indicates whether Oracle Functions should execute the request and return the result ('sync') of the execution, or whether Oracle Functions should return as soon as processing has begun ('detached') and leave result handling to the function.
    function_id str
    The OCID of this function.
    input_body_source_path str

    An absolute path to a file on the local system that contains the input to be provided to the function. Cannot be defined if invoke_function_body or invoke_function_body_base64_encoded is defined. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    invoke_endpoint str
    invoke_function_body str
    The body of the function invocation. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit. Cannot be defined if input_body_source_path or invoke_function_body_base64_encoded is defined.
    invoke_function_body_base64_encoded str
    base64EncodeContent Boolean
    content String
    Content of the response string, if any. If base64_encode_content is set to true, then this content will be base64 encoded.
    fnIntent String
    An optional intent header that indicates to the FDK the way the event should be interpreted. E.g. 'httprequest', 'cloudevent'.
    fnInvokeType String
    Indicates whether Oracle Functions should execute the request and return the result ('sync') of the execution, or whether Oracle Functions should return as soon as processing has begun ('detached') and leave result handling to the function.
    functionId String
    The OCID of this function.
    inputBodySourcePath String

    An absolute path to a file on the local system that contains the input to be provided to the function. Cannot be defined if invoke_function_body or invoke_function_body_base64_encoded is defined. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    invokeEndpoint String
    invokeFunctionBody String
    The body of the function invocation. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit. Cannot be defined if input_body_source_path or invoke_function_body_base64_encoded is defined.
    invokeFunctionBodyBase64Encoded String

    Import

    Import is not supported for this resource.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.24.0 published on Thursday, Feb 22, 2024 by Pulumi