Table: oci_functions_function - Query OCI Functions using SQL
Oracle Cloud Infrastructure (OCI) Functions is a fully managed, multi-tenant, highly scalable, on-demand, Functions-as-a-Service (FaaS) platform. It is powered by the open source Fn Project and allows developers to write and deploy code without provisioning and managing servers. OCI Functions can be written in Java, Python, Node, Go, and Ruby, and they can be triggered by HTTP requests or OCI Events Service.
Table Usage Guide
The oci_functions_function
table provides insights into functions within Oracle Cloud Infrastructure (OCI) Functions. As a software developer or DevOps engineer, you can explore function-specific details through this table, including the runtime, memory limits, and associated metadata. Use it to uncover information about functions, such as their execution environment, the maximum amount of time that the function is allowed to run, and the state of the function.
Examples
Basic info
Explore the basic information of your Oracle Cloud Infrastructure functions to gain insights into details such as their lifecycle state and associated application ID. This can help in understanding the current state and configuration of your serverless applications.
select display_name, id, application_id, lifecycle_state, image, image_digestfrom oci_functions_function;
select display_name, id, application_id, lifecycle_state, image, image_digestfrom oci_functions_function;
List functions where trace configuration is disabled
Identify functions where trace configuration is not enabled to understand potential areas of risk or lack of visibility in your application performance monitoring.
select display_name, id, application_id, trace_config -> 'isEnabled' as trace_config_is_enabledfrom oci_functions_functionwhere not (trace_config -> 'isEnabled') :: bool;
select display_name, id, application_id, json_extract(trace_config, '$.isEnabled') as trace_config_is_enabledfrom oci_functions_functionwhere not json_extract(trace_config, '$.isEnabled');
List functions where memory is greater than 100 MB
Discover the functions that are using more than 100 MB of memory. This can be useful to identify high-memory usage functions that may need optimization or resource allocation adjustments.
select display_name, id, application_id, memory_in_mbsfrom oci_functions_functionwhere memory_in_mbs > 100;
select display_name, id, application_id, memory_in_mbsfrom oci_functions_functionwhere memory_in_mbs > 100;
Schema for oci_functions_function
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
application_id | text | The OCID of the application the function belongs to. | |
compartment_id | text | The OCID of the compartment in Tenant in which the resource is located. | |
config | jsonb | The function configuration. Overrides application configuration. | |
defined_tags | jsonb | Defined tags for resource. Defined tags are set up in your tenancy by an administrator. Only users granted permission to work with the defined tags can apply them to resources. | |
display_name | text | The display name of the function. | |
freeform_tags | jsonb | Free-form tags for resource. This tags can be applied by any user with permissions on the resource. | |
id | text | = | The OCID of the function. |
image | text | The qualified name of the Docker image to use in the function, including the image tag. The image should be in the OCI Registry that is in the same region as the function itself. | |
image_digest | text | The image digest for the version of the image that will be pulled when invoking this function. If no value is specified, the digest currently associated with the image in the OCI Registry will be used. | |
invoke_endpoint | text | The base https invoke URL to set on a client in order to invoke a function. This URL will never change over the lifetime of the function and can be cached. | |
lifecycle_state | text | = | The current state of the function. |
memory_in_mbs | bigint | Maximum usable memory for the function (MiB). | |
region | text | The OCI region in which the resource is located. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
tags | jsonb | A map of tags for the resource. | |
tenant_id | text | =, !=, ~~, ~~*, !~~, !~~* | The OCID of the Tenant in which the resource is located. |
tenant_name | text | The name of the Tenant in which the resource is located. | |
time_created | timestamp with time zone | The time the function was created. | |
time_updated | timestamp with time zone | The time the function was updated. | |
timeout_in_seconds | bigint | Timeout for executions of the function. Value in seconds. | |
title | text | Title of the resource. | |
trace_config | jsonb | The trace configuration of the function. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- oci
You can pass the configuration to the command with the --config
argument:
steampipe_export_oci --config '<your_config>' oci_functions_function