Creating and Running a Query
From the Run queries page, you can create and run a query.
You can rerun queries that you have already run, add them to Favorites, and base scheduled queries on them.
- For a complete list of flags and variable options for CLI commands, see the Command Line Reference. - Queries - Use the oci cloud-guard adhoc-query create command and required parameters to create a query: - oci cloud-guard adhoc-query create --adhoc-query-details <valid_json_complex_type> --compartment-id, -c <compartment_ocid> [OPTIONS]- Query Results - Use the oci cloud-guard adhoc-query-result-collection get-adhoc-query-result-content command and required parameters to download results for a specific query to a file: - oci cloud-guard adhoc-query-result-collection get-adhoc-query-result-content --adhoc-query-id <query_ocid> --file <file_name> [OPTIONS]- Use the oci cloud-guard adhoc-query-result-collection list-adhoc-query-results command and required parameters to list results for a specific query: - oci cloud-guard adhoc-query-result-collection list-adhoc-query-results --adhoc-query-id <query_ocid> --compartment-id, -c <compartment_ocid> [OPTIONS]
- Queries - Run the CreateAdhocQuery operation to create a query. - Query Results - Run the GetAdhocQueryResultContent operation to download results for a specific query to a file. - Run the ListAdhocQueryResults operation to list results for a specific query. 
What's Next
- To manage queries created previously, see Managing Past Queries.
- To add this query to the favorites list, see Managing the Query Favorites List.
- To schedule this query to run periodically, see Scheduling a New Query.
 at the right end of the row for the instance to see the detailed information for all the items in the instance.
 at the right end of the row for the instance to see the detailed information for all the items in the instance.