steampipe plugin install oci

Table: oci_autoscaling_auto_scaling_configuration - Query OCI Autoscaling Auto Scaling Configurations using SQL

Auto Scaling in OCI is a cloud service that helps you maintain application availability and allows you to dynamically adjust capacity in response to changing demand patterns. This service ensures that your applications always have the right amount of compute, memory, and other resources they need to stay responsive, even when demand is unpredictable. Auto Scaling automatically adjusts the number of instances in response to changes in load.

Table Usage Guide

The oci_autoscaling_auto_scaling_configuration table provides insights into the Auto Scaling Configurations within OCI Autoscaling. As a DevOps engineer, you can explore configuration-specific details through this table, including policies, resources, and associated metadata. Use it to uncover information about configurations, such as those with specific policies, the resources associated with each configuration, and the current state of each configuration.

Examples

Basic info

Determine the areas in which OCI auto-scaling configurations are enabled to gain insights into resource count and creation time. This can be useful for assessing the efficiency and capacity of your auto-scaling setup.

select
display_name,
id,
is_enabled,
time_created,
cool_down_in_seconds,
max_resource_count
from
oci_autoscaling_auto_scaling_configuration;
select
display_name,
id,
is_enabled,
time_created,
cool_down_in_seconds,
max_resource_count
from
oci_autoscaling_auto_scaling_configuration;

List enabled autoscaling configurations

Explore the configurations that have autoscaling enabled. This is useful to understand the resources that are set to automatically adjust capacity to maintain steady, predictable performance at the lowest possible cost.

select
display_name,
id,
is_enabled
from
oci_autoscaling_auto_scaling_configuration
where
is_enabled;
select
display_name,
id,
is_enabled
from
oci_autoscaling_auto_scaling_configuration
where
is_enabled;

Get policy details for each autoscaling configuration

This example allows you to analyze all the policies associated with your autoscaling configurations, giving you insights into their status, types, rules, and capacities. This can be beneficial in managing and optimizing your autoscaling configurations for better resource utilization and cost efficiency.

select
display_name as autoscaling_configuration_display_name,
id,
p ->> 'displayName' as policy_display_name,
p ->> 'id' as policy_id,
p ->> 'isEnabled' as policy_is_enabled,
p ->> 'policyType' as policy_type,
p ->> 'rules' as rules,
p ->> 'capacity' as capacity
from
oci_autoscaling_auto_scaling_configuration,
jsonb_array_elements(policies) as p
select
display_name as autoscaling_configuration_display_name,
id,
json_extract(p.value, '$.displayName') as policy_display_name,
json_extract(p.value, '$.id') as policy_id,
json_extract(p.value, '$.isEnabled') as policy_is_enabled,
json_extract(p.value, '$.policyType') as policy_type,
json_extract(p.value, '$.rules') as rules,
json_extract(p.value, '$.capacity') as capacity
from
oci_autoscaling_auto_scaling_configuration,
json_each(policies) as p

Get resource details for each autoscaling configuration

Explore the details of each autoscaling configuration to understand the associated resources. This can help in managing and optimizing your cloud resources effectively.

select
display_name as autoscaling_configuration_display_name,
id as autoscaling_configuration_id,
resource ->> 'id' as resource_id,
resource ->> 'type' as resource_type
from
oci_autoscaling_auto_scaling_configuration;
select
display_name as autoscaling_configuration_display_name,
id as autoscaling_configuration_id,
json_extract(resource, '$.id') as resource_id,
json_extract(resource, '$.type') as resource_type
from
oci_autoscaling_auto_scaling_configuration;

Schema for oci_autoscaling_auto_scaling_configuration

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
compartment_idtext=The OCID of the compartment in Tenant in which the resource is located.
cool_down_in_secondsbigintThe minimum period of time to wait between scaling actions.
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_nametext=A user-friendly name.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtext=The OCID of the autoscaling configuration.
is_enabledbooleanIndicates whether the autoscaling configuration is enabled.
max_resource_countbigintThe maximum number of resources to scale out to.
min_resource_countbigintThe minimum number of resources to scale in to.
policiesjsonbAutoscaling policy definitions for the autoscaling configuration.
regiontextThe OCI region in which the resource is located.
resourcejsonbThe resource details of this AutoScalingConfiguration.
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 date and time the AutoScalingConfiguration was created.
titletextTitle of the resource.

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_autoscaling_auto_scaling_configuration