Scheduling a New Query
Create a scheduled query from a new query.
Prerequisite: You should always run a new query to check that it returns the results you expect, before setting up as a scheduled query. See Creating and Running a Query.
- Note
Scheduled queries run automatically, according to the schedule that you specify. If you just want a query to be easier to locate when you run the query manually, add the query to the favorites list. See Managing the Query Favorites List. For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Use the oci cloud-guard data-source change-compartment command and required parameters to move a scheduled query to a different compartment:
oci cloud-guard data-source change-compartment --compartment-id, -c <compartment_ocid> --data-source-id <data_source_ocid> [OPTIONS]
Use the oci cloud-guard data-source create command and required parameters to create a scheduled query:
oci cloud-guard data-source create --compartment-id, -c <compartment_ocid> --data-source-feed-provider <feed_provider_type> --display-name <data_source_display_name> [OPTIONS]
Use the oci cloud-guard data-source delete command and required parameters to delete a scheduled query:
oci cloud-guard data-source delete --data-source-id <data_source_ocid> [OPTIONS]
Use the oci cloud-guard data-source get command and required parameters to get the details for a specific scheduled query:
oci cloud-guard data-source get --data-source-id <data_source_ocid> [OPTIONS]
Use the oci cloud-guard data-source list-data-source-events command and required parameters to list events for a specific scheduled query:
oci cloud-guard data-source list-data-source-events --data-source-id <data_source_ocid> [OPTIONS]
Use the oci cloud-guard data-source list command and required parameters to list scheduled queries in a compartment:
oci cloud-guard data-source list --compartment-id, -c <compartment_ocid> [OPTIONS]
Use the oci cloud-guard data-source update command and required parameters to update a specific scheduled query:
oci cloud-guard data-source update --data-source-id <data_source_ocid> [OPTIONS]
Run the ChangeDataSourceCompartment operation to move a scheduled query to a different compartment.
Run the CreateDataSource operation to create a scheduled query.
Run the DeleteDataSource operation to delete a scheduled query.
Run the GetDataSource operation to get the details for a specific scheduled query.
Run the ListDataSourceEvents operation to list events for a specific scheduled query.
Run the ListDataSources operation to list all available scheduled queries in a compartment.
Run the UpdateDataSource operation to update a specific scheduled query.
What's Next
- To see the output from scheduled query runs, see Retrieving JSON for Scheduled Query Results.
- To run a query manually, see Managing Past Queries.
- To create a new query, see Creating and Running a Query.