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_countfrom oci_autoscaling_auto_scaling_configuration;
select display_name, id, is_enabled, time_created, cool_down_in_seconds, max_resource_countfrom 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_enabledfrom oci_autoscaling_auto_scaling_configurationwhere is_enabled;
select display_name, id, is_enabledfrom oci_autoscaling_auto_scaling_configurationwhere 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 capacityfrom 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 capacityfrom 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_typefrom 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_typefrom oci_autoscaling_auto_scaling_configuration;
Schema for oci_autoscaling_auto_scaling_configuration
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
compartment_id | text | = | The OCID of the compartment in Tenant in which the resource is located. |
cool_down_in_seconds | bigint | The minimum period of time to wait between scaling actions. | |
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 | = | A user-friendly name. |
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 autoscaling configuration. |
is_enabled | boolean | Indicates whether the autoscaling configuration is enabled. | |
max_resource_count | bigint | The maximum number of resources to scale out to. | |
min_resource_count | bigint | The minimum number of resources to scale in to. | |
policies | jsonb | Autoscaling policy definitions for the autoscaling configuration. | |
region | text | The OCI region in which the resource is located. | |
resource | jsonb | The resource details of this AutoScalingConfiguration. | |
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 date and time the AutoScalingConfiguration was created. | |
title | text | Title 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