---
title: Keycloak Export
slug: homologacao-atmosphere/keycloak-export
description: Learn how to export the configuration of a realm and its associated resources to a JSON file with this comprehensive document. Discover the module's parameters, such as export_clients and export_groups_and_roles, which allow you to choose what to export. 
createdAt: 2021-11-11T11:57:45.000Z
---

# Resumo

- Este módulo permite exportar a configuração do realm e outros recursos associados para um arquivo json.

# Parâmetros

| **Parâmetro**              | **Tipo** | **Escolhas \| Valor Padrão**                      | **Comentários**                                |
| -------------------------- | -------- | ------------------------------------------------- | ---------------------------------------------- |
| export\_clients            | boolean  | Escolhas:<br />- false<br />(default)<br />- true | Se ativado, exporta todos os clientes.         |
| export\_groups\_and\_roles | boolean  | Escolhas:<br />- false<br />(default)<br />- true | Se ativado, exporta todos os grupos e funções. |
| file\_name                 | string   |                                                   | Nome do arquivo a ser salvo.                   |
| path                       | path     |                                                   | Caminho para salvar seu realm.                 |
| realm                      | string   |                                                   | Nome do realm que você deseja exportar.        |



## Exemplos

```yaml
# Exemplo: Exportar o realm master para um arquivo de "Teste"
- keycloak_export:
    auth_keycloak_url: http://localhost:8080/auth
    auth_username: admin
    auth_password: password
    auth_realm: master
    auth_client_id: admin-cli
    realm: "master"
    file_name: "Testing"
    export_clients: true
    export_groups_and_roles: true
    path: /home/user/Documents
```



## Valores retornados

| **Chave** | **Tipo** | **Retornado quando** | **Descrição**                     |
| --------- | -------- | -------------------- | --------------------------------- |
| exported  | boolean  | Sempre               | Se a exportação foi bem sucedida. |
| path      | path     | Sempre               | Caminho onde o arquivo foi salvo. |



