oci_functions_invoke_function
This resource provides the Invoke Function resource in Oracle Cloud Infrastructure Functions service.
Invokes a function
Example Usage
resource "oci_functions_invoke_function" "test_invoke_function" {
#Required
function_id = oci_functions_function.test_function.id
#Optional
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
}
Argument Reference
The following arguments are supported:
base64_encode_content
- (Optional) Encodes the response returned, if any, in base64. It is recommended to set this totrue
to avoid corrupting the returned response, if any, in Terraform state. The default value isfalse
.invoke_function_body
- (Optional) 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 ifinput_body_source_path
orinvoke_function_body_base64_encoded
is defined.fn_intent
- (Optional) An optional intent header that indicates to the FDK the way the event should be interpreted. E.g. ‘httprequest’, ‘cloudevent’.fn_invoke_type
- (Optional) 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
- (Required) The OCID of this function.invoke_function_body_base64_encoded
- (Optional) The Base64 encoded body of the function invocation. Base64 encoded input avoids corruption in Terraform state. Cannot be defined ifinvoke_function_body
orinput_body_source_path
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.input_body_source_path
- (Optional) An absolute path to a file on the local system that contains the input to be provided to the function. Cannot be defined ifinvoke_function_body
orinvoke_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
Attributes Reference
The following attributes are exported:
content
- Content of the response string, if any. Ifbase64_encode_content
is set totrue
, then this content will be base64 encoded.
Timeouts
The timeouts
block allows you to specify timeouts for certain operations:
* create
- (Defaults to 20 minutes), when creating the Invoke Function
* update
- (Defaults to 20 minutes), when updating the Invoke Function
* delete
- (Defaults to 20 minutes), when destroying the Invoke Function
Import
Import is not supported for this resource.