list-audit-event-analytics
¶
Description¶
By default the ListAuditEventAnalytics operation will return all of the summary columns. To filter for a specific summary column, specify it in the summaryField query parameter.
Example: /ListAuditEventAnalytics?summaryField=targetName&summaryField=userName&summaryField=clientHostname &summaryField=dmls&summaryField=privilegeChanges&summaryField=ddls&summaryField=loginFailure&summaryField=loginSuccess &summaryField=allRecord&q=(auditEventTime ge “2021-06-13T23:49:14”)
/ListAuditEventAnalytics?timeStarted=2022-08-18T11:02:26.000Z&timeEnded=2022-08-24T11:02:26.000Z This will give number of events grouped by periods. Period can be 1 day, 1 week, etc.
/ListAuditEventAnalytics?summaryField=targetName&groupBy=targetName This will give the number of events group by targetName. Only targetName summary column would be returned.
Required Parameters¶
-
--compartment-id
,
-c
[text]
¶
A filter to return only resources that match the specified compartment OCID.
Optional Parameters¶
-
--access-level
[text]
¶
Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
Accepted values are:
ACCESSIBLE, RESTRICTED
-
--all
¶
Fetches all pages of results. If you provide this option, then you cannot provide the --limit
option.
-
--compartment-id-in-subtree
[boolean]
¶
Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the ‘accessLevel’ setting.
-
--from-json
[text]
¶
Provide input to this command as a JSON document from a file using the file://path-to/file syntax.
The --generate-full-command-json-input
option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id –> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.
Options can still be provided on the command line. If an option exists in both the JSON document and the command line then the command line specified value will be used.
For examples on usage of this option, please see our “using CLI with advanced JSON options” link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions
-
--group-by
[text]
¶
A groupBy can only be used in combination with summaryField parameter. A groupBy value has to be a subset of the values mentioned in summaryField parameter.
Accepted values are:
auditEventTime, auditType, clientHostname, clientId, clientProgram, dbUserName, eventName, objectType, targetClass, targetId, targetName
-
--if-match
[text]
¶
For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
-
--limit
[integer]
¶
For details about how pagination works, see List Pagination.
-
--page
[text]
¶
It is usually retrieved from a previous “List” call. For details about how pagination works, see List Pagination.
-
--page-size
[integer]
¶
When fetching results, the number of results to fetch per call. Only valid when used with --all
or --limit
, and ignored otherwise.
-
--query-time-zone
[text]
¶
Default time zone is UTC if no time zone provided. The date-time considerations of the resource will be in accordance with the specified time zone.
-
--scim-query
[text]
¶
The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 of the System for Cross-Domain Identity Management (SCIM) specification, which is available at RFC3339. In SCIM filtering expressions, text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. (Numeric and boolean values should not be quoted.)
Example: (operationTime ge “2021-06-04T12:00:00.000Z”) and (eventName eq “LOGON”)
-
--sort-by
[text]
¶
If this query parameter is specified, the result is ordered based on this query parameter value.
Accepted values are:
auditEventTime, auditType, clientHostname, clientId, clientProgram, dbUserName, eventName, objectType, targetClass, targetId, targetName
-
--sort-order
[text]
¶
The sort order to use, either ascending (ASC) or descending (DESC).
Accepted values are:
ASC, DESC
-
--summary-field
[text]
¶
Specifies a subset of summarized fields to be returned in the response.
Accepted values are:
allRecord, allViolations, alters, auditEventTime, auditSettingsChange, auditSettingsDisables, auditSettingsEnables, auditType, clientHostname, clientId, clientProgram, creates, dbSchemaChange, dbUserName, ddls, dmls, drops, dvconfigActivities, entitlementChange, eventName, grants, loginFailure, loginSuccess, objectType, privilegeChanges, realmViolations, revokes, ruleViolations, selects, targetClass, targetId, targetName
-
--time-ended
[datetime]
¶
An optional filter to return audit events whose creation time in the database is less than and equal to the date-time specified, in the format defined by RFC3339.
The following datetime formats are supported:
UTC with microseconds¶
Format: YYYY-MM-DDTHH:mm:ss.ssssssTZD
Example: 2017-09-15T20:30:00.123456Z
UTC with milliseconds
***********************
.. code::
Format: YYYY-MM-DDTHH:mm:ss.sssTZD
Example: 2017-09-15T20:30:00.123Z
UTC without milliseconds
**************************
.. code::
Format: YYYY-MM-DDTHH:mm:ssTZD
Example: 2017-09-15T20:30:00Z
UTC with minute precision
**************************
.. code::
Format: YYYY-MM-DDTHH:mmTZD
Example: 2017-09-15T20:30Z
Timezone with microseconds¶
Format: YYYY-MM-DDTHH:mm:ssTZD
Example: 2017-09-15T12:30:00.456789-08:00, 2017-09-15T12:30:00.456789-0800
Timezone with milliseconds
***************************
.. code::
Format: YYYY-MM-DDTHH:mm:ssTZD
Example: 2017-09-15T12:30:00.456-08:00, 2017-09-15T12:30:00.456-0800
Timezone without milliseconds
*******************************
.. code::
Format: YYYY-MM-DDTHH:mm:ssTZD
Example: 2017-09-15T12:30:00-08:00, 2017-09-15T12:30:00-0800
Timezone with minute precision
*******************************
.. code::
Format: YYYY-MM-DDTHH:mmTZD
Example: 2017-09-15T12:30-08:00, 2017-09-15T12:30-0800
Short date and time
********************
The timezone for this date and time will be taken as UTC (Needs to be surrounded by single or double quotes)
.. code::
Format: 'YYYY-MM-DD HH:mm' or "YYYY-MM-DD HH:mm"
Example: '2017-09-15 17:25'
Date Only
**********
This date will be taken as midnight UTC of that day
.. code::
Format: YYYY-MM-DD
Example: 2017-09-15
Epoch seconds
**************
.. code::
Example: 1412195400
-
--time-started
[datetime]
¶
An optional filter to return audit events whose creation time in the database is greater than and equal to the date-time specified, in the format defined by RFC3339.
The following datetime formats are supported:
UTC with microseconds¶
Format: YYYY-MM-DDTHH:mm:ss.ssssssTZD
Example: 2017-09-15T20:30:00.123456Z
UTC with milliseconds
***********************
.. code::
Format: YYYY-MM-DDTHH:mm:ss.sssTZD
Example: 2017-09-15T20:30:00.123Z
UTC without milliseconds
**************************
.. code::
Format: YYYY-MM-DDTHH:mm:ssTZD
Example: 2017-09-15T20:30:00Z
UTC with minute precision
**************************
.. code::
Format: YYYY-MM-DDTHH:mmTZD
Example: 2017-09-15T20:30Z
Timezone with microseconds¶
Format: YYYY-MM-DDTHH:mm:ssTZD
Example: 2017-09-15T12:30:00.456789-08:00, 2017-09-15T12:30:00.456789-0800
Timezone with milliseconds
***************************
.. code::
Format: YYYY-MM-DDTHH:mm:ssTZD
Example: 2017-09-15T12:30:00.456-08:00, 2017-09-15T12:30:00.456-0800
Timezone without milliseconds
*******************************
.. code::
Format: YYYY-MM-DDTHH:mm:ssTZD
Example: 2017-09-15T12:30:00-08:00, 2017-09-15T12:30:00-0800
Timezone with minute precision
*******************************
.. code::
Format: YYYY-MM-DDTHH:mmTZD
Example: 2017-09-15T12:30-08:00, 2017-09-15T12:30-0800
Short date and time
********************
The timezone for this date and time will be taken as UTC (Needs to be surrounded by single or double quotes)
.. code::
Format: 'YYYY-MM-DD HH:mm' or "YYYY-MM-DD HH:mm"
Example: '2017-09-15 17:25'
Date Only
**********
This date will be taken as midnight UTC of that day
.. code::
Format: YYYY-MM-DD
Example: 2017-09-15
Epoch seconds
**************
.. code::
Example: 1412195400
Global Parameters¶
Use oci --help
for help on global parameters.
--auth-purpose
, --auth
, --cert-bundle
, --cli-auto-prompt
, --cli-rc-file
, --config-file
, --connection-timeout
, --debug
, --defaults-file
, --endpoint
, --generate-full-command-json-input
, --generate-param-json-input
, --help
, --latest-version
, --max-retries
, --no-retry
, --opc-client-request-id
, --opc-request-id
, --output
, --profile
, --proxy
, --query
, --raw-output
, --read-timeout
, --realm-specific-endpoint
, --region
, --release-info
, --request-id
, --version
, -?
, -d
, -h
, -i
, -v
Example using required parameter¶
Copy the following CLI commands into a file named example.sh. Run the command by typing “bash example.sh” and replacing the example parameters with your own.
Please note this sample will only work in the POSIX-compliant bash-like shell. You need to set up the OCI configuration and appropriate security policies before trying the examples.
export compartment_id=<substitute-value-of-compartment_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/data-safe/audit-event-summary/list-audit-event-analytics.html#cmdoption-compartment-id
oci data-safe audit-event-summary list-audit-event-analytics --compartment-id $compartment_id