Docs Menu
Docs Home
/ /
Atlas CLI
/ /

atlas auditing update

On this page

  • Syntax
  • Options
  • Inherited Options
  • Output
  • Examples

Updates the auditing configuration for the specified project

To use this command, you must authenticate with a user account or an API key with the Project Owner role.

Command Syntax
atlas auditing update [options]
Name
Type
Required
Description
--auditAuthorizationSuccess
false
Flag that indicates whether someone set auditing to track successful authentications. This only applies to the "atype" : "authCheck" audit filter. Setting this parameter to true degrades cluster performance.
--auditFilter
string
false

JSON document that specifies which events to record. Escape any characters that may prevent parsing, such as single or double quotes, using a backslash ().

Mutually exclusive with --file.

--enabled
false
Flag that indicates whether someone enabled database auditing for the specified project.
-f, --file
string
false

Path to an optional JSON configuration file that defines auditing filters. To learn more about auditing configuration files for the Atlas CLI, see https://www.mongodb.com/pt-br/docs/atlas/database-auditing/#example-auditing-filters

Mutually exclusive with --auditFilter.

-h, --help
false
help for update
-o, --output
string
false
Output format. Valid values are json, json-path, go-template, or go-template-file. To see the full output, use the -o json option.
--projectId
string
false
Hexadecimal string that identifies the project to use. This option overrides the settings in the configuration file or environment variable.
Name
Type
Required
Description
-P, --profile
string
false

If the command succeeds, the CLI returns output similar to the following sample. Values in brackets represent your values.

Auditing configuration successfully updated.
# Audit all authentication events for known users:
atlas auditing update --auditFilter '{"atype": "authenticate"}'
# Audit all authentication events for known user via a configuration file:
atlas auditing update -f filter.json

Back

describe