# Manage Audit Export

{% hint style="info" %}
**Public preview**: This feature is available to all accounts.
{% endhint %}

Use these audit export configuration commands to manage exporting your audit logs to S3 and ADLS Gen2, including intervals the events are exported and the S3 bucket or ADLS container they are exported to.

## `immuta audit exportConfig {command} <arguments> [flags]`

Inspect, disable, enable, and delete configurations for exporting your audit events to S3 and ADLS Gen2.

The Immuta Audit CLI supports a number of flags for every command.

* `--config string`: Specifies the configuration file name and where it will be saved. (The default is `$HOME/.immutacfg.yaml`.)
* `-h`, `--help`: Gets more information about the command.
* `-p`, `--profile string`: Specifies the profile for what instance the CLI will use.

## Commands

| Command                                                                                                                                                                                                                                                                                                    | Argument                                                                                                                                | Flags                                               |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| <p><code>create \<technology> \[flags]</code>: Configures a time interval and location to export your audit logs to. Options for <code>\<technology></code> are <code>s3</code> and <code>adls</code>.<br><br><em>Example</em>: <code>$ immuta audit exportConfig create:s3 ./exportConfig.json</code></p> | The filepath to the JSON or YAML file that configures the location and time interval for exporting your audit logs to S3 and ADLS Gen2. | <ul><li><code>-o</code>, \`- -output json</li></ul> |
| <p><code>delete \<export configuration ID> \[flags]</code>: Deletes an audit export configuration based on the provided ID.<br><br><em>Example</em>: <code>$ immuta audit exportConfig delete f7f9e289-f37b-4942-a18d-66d6de6e7cb2</code></p>                                                              | The ID of the export configuration.                                                                                                     | <ul><li><code>-o</code>, \`--output json</li></ul>  |
| <p><code>disable \<export configuration ID> \[flags]</code>: Disables an audit export configuration based on the provided ID.<br><br><em>Example</em>: <code>$ immuta audit exportConfig disable f7f9e289-f37b-4942-a18d-66d6de6e7cb2</code></p>                                                           | The ID of the export configuration.                                                                                                     | <ul><li><code>-o</code>, \`--output json</li></ul>  |
| <p><code>enable \<export configuration ID> \[flags]</code>: Enables an audit export configuration based on the provided ID.<br><br><em>Example</em>: <code>$ immuta audit exportConfig enable f7f9e289-f37b-4942-a18d-66d6de6e7cb2</code></p>                                                              | The ID of the export configuration.                                                                                                     | <ul><li><code>-o</code>, \`--output json</li></ul>  |
| `get <export configuration ID> [flags]`: Gets an audit export configuration based on the provided ID. *See example* [*below*](#audit-export-configuration-example)*.*                                                                                                                                      | The ID of the export configuration.                                                                                                     | <ul><li><code>-o</code>, \`--output json</li></ul>  |
| <p><code>list \[flags]</code>: Lists all export configurations.<br><br><em>Example</em>: <code>$ immuta audit exportConfig list</code></p>                                                                                                                                                                 |                                                                                                                                         | <ul><li><code>-o</code>, \`--output json</li></ul>  |

### Audit Export Configuration Example

```bash
$ immuta audit exportConfig get f7f9e289-f37b-4942-a18d-66d6de6e7cb2
$
{
  "id": "f7f9e289-f37b-4942-a18d-66d6de6e7cb2",
  "interval": "EVERY_12_HOURS",
  "enabled": true,
  "endpointConfiguration": {
    "__typename": "S3EndpointConfiguration",
    "bucket": "your-s3-bucket",
    "path": "hr-data",
    "region": "us-east-1",
    "accessKeyId": "accessKey"
  },
  "createdAt": "2022-10-23T23:03:11.466Z",
  "createdBy": {
    "name": "John Doe",
    "identityProvider": "okta",
    "id": "johndoe@example.com",
    "type": "USER"
  },
  "updatedAt": "2022-10-23T23:03:11.466Z",
  "updatedBy": {
    "name": "John Doe",
    "identityProvider": "okta",
    "id": "johndoe@example.com",
    "type": "USER"
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.immuta.com/saas/developer-guides/the-immuta-cli/cli-reference-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
