steampipe plugin install oci

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_digest
from
oci_functions_function;
select
display_name,
id,
application_id,
lifecycle_state,
image,
image_digest
from
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_enabled
from
oci_functions_function
where
not (trace_config -> 'isEnabled') :: bool;
select
display_name,
id,
application_id,
json_extract(trace_config, '$.isEnabled') as trace_config_is_enabled
from
oci_functions_function
where
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_mbs
from
oci_functions_function
where
memory_in_mbs > 100;
select
display_name,
id,
application_id,
memory_in_mbs
from
oci_functions_function
where
memory_in_mbs > 100;

Schema for oci_functions_function

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
application_idtextThe OCID of the application the function belongs to.
compartment_idtextThe OCID of the compartment in Tenant in which the resource is located.
configjsonbThe function configuration. Overrides application configuration.
defined_tagsjsonbDefined 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_nametextThe display name of the function.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtext=The OCID of the function.
imagetextThe 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_digesttextThe 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_endpointtextThe 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_statetext=The current state of the function.
memory_in_mbsbigintMaximum usable memory for the function (MiB).
regiontextThe OCI region in which the resource is located.
tagsjsonbA map of tags for the resource.
tenant_idtextThe OCID of the Tenant in which the resource is located.
tenant_nametextThe name of the Tenant in which the resource is located.
time_createdtimestamp with time zoneThe time the function was created.
time_updatedtimestamp with time zoneThe time the function was updated.
timeout_in_secondsbigintTimeout for executions of the function. Value in seconds.
titletextTitle of the resource.
trace_configjsonbThe 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