Table: oci_cloud_guard_target - Query OCI Cloud Guard Targets using SQL
Cloud Guard is a security service provided by Oracle Cloud Infrastructure (OCI). It operates as a log and events aggregator that continuously collects, records, and analyzes data, providing a unified view of the security posture of a tenancy. Cloud Guard uses this data to identify any security weak points and actively rectify problems.
Table Usage Guide
The oci_cloud_guard_target
table provides insights into Cloud Guard Targets within Oracle Cloud Infrastructure (OCI). As a security or compliance officer, you can utilize this table to explore detailed information about each target, including its status, risk level, and associated resources. This can be particularly useful for monitoring and improving the security posture of your OCI environment, as well as for compliance reporting.
Examples
Basic info
Explore the creation times and lifecycle states of your cloud guard targets to better understand their current status and longevity. This can be useful in managing resources and identifying any targets that may require attention or updates.
select name, id, time_created, lifecycle_state as statefrom oci_cloud_guard_target;
select name, id, time_created, lifecycle_state as statefrom oci_cloud_guard_target;
List targets which are not active
Explore which Cloud Guard targets are not currently active. This is useful for identifying potential security risks or areas that may need maintenance or updates.
select name, id, time_created, lifecycle_state as statefrom oci_cloud_guard_targetwhere lifecycle_state <> 'ACTIVE';
select name, id, time_created, lifecycle_state as statefrom oci_cloud_guard_targetwhere lifecycle_state <> 'ACTIVE';
Schema for oci_cloud_guard_target
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. |
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. | |
description | text | The target description. | |
freeform_tags | jsonb | Free-form tags for resource. This tags can be applied by any user with permissions on the resource. | |
id | text | = | OCID for target. |
inherited_by_compartments | jsonb | List of inherited compartments. | |
lifecycle_state | text | = | The current state of the resource. |
lifecyle_details | text | A message describing the current state in more detail. | |
name | text | = | Target display name. |
recipe_count | bigint | Total number of recipes attached to target. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
system_tags | jsonb | System tags for resource. System tags can be viewed by users, but can only be created by the system. | |
tags | jsonb | A map of tags for the resource. | |
target_detector_recipes | jsonb | List of detector recipes associated with target. | |
target_resource_id | text | Resource ID which the target uses to monitor. | |
target_resource_type | text | Possible type of targets(compartment/HCMCloud/ERPCloud). | |
target_responder_recipes | jsonb | List of responder recipes associated with target. | |
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 target was created. | |
time_updated | timestamp with time zone | The date and time the target was updated. | |
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_cloud_guard_target