> For the complete documentation index, see [llms.txt](https://docs.ionos.com/ansible/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/ansible/usage/returnvalues.md).

# Return values

## create

For create operations, the module returns a dict containing:

| Name     | Value                | Description                                                                                       |
| -------- | -------------------- | ------------------------------------------------------------------------------------------------- |
| action   | always **create**    | The name of the current action                                                                    |
| change   | `True` or `False`    | If the task made changes within the resources                                                     |
| failed   | `True` or `False`    | If the task failed                                                                                |
| resource | The current resource | The key contains the resource name and the value is a dictionary containing the current resource. |

Example for datacenter resource:

```json
{
    "action": "create",
    "changed": false,
    "datacenter": {
        "entities": {},
        "href": "https://api.ionos.com/cloudapi/v5/datacenters/3f0a326d-5a51-4a4e-bd9c-a4c8d9df06f7",
        "id": "3f0a326d-5a51-4a4e-bd9c-a4c8d9df06f7",
        "metadata": {},
        "properties": {
            "description": null,
            "features": [
                "SSD"
            ],
            "location": "de/fra",
            "name": "ANSIBLE TEST",
            "sec_auth_protection": false,
            "version": 6
        },
        "type": "datacenter"
    },
    "failed": false
}
```

## update

For update operations, the module returns a dict containing:

| Name     | Value                | Description                                                                                       |
| -------- | -------------------- | ------------------------------------------------------------------------------------------------- |
| action   | always **update**    | The name of the current action                                                                    |
| change   | `True` or `False`    | If the task made changes within the resources                                                     |
| failed   | `True` or `False`    | If the task failed                                                                                |
| resource | The current resource | The key contains the resource name and the value is a dictionary containing the current resource. |

Example for datacenter resource:

```
{
    "action": "update",
    "changed": true,
    "datacenter": {
        "entities": {},
        "href": "https://api.ionos.com/cloudapi/v5/datacenters/3f0a326d-5a51-4a4e-bd9c-a4c8d9df06f7",
        "id": "3f0a326d-5a51-4a4e-bd9c-a4c8d9df06f7",
        "metadata": {},
        "properties": {
            "description": "Ansible test description 2 - RENAMED",
            "features": [
                "SSD"
            ],
            "location": "de/fra",
            "name": "ANSIBLE TEST",
            "sec_auth_protection": false,
            "version": 6
        },
        "type": "datacenter"
    },
    "failed": false
}
```

## delete

For delete operations, the module returns a dict containing:

| Name   | Value                  | Description                                   |
| ------ | ---------------------- | --------------------------------------------- |
| action | always **delete**      | The name of the current action                |
| change | `True` or `False`      | If the task made changes within the resources |
| failed | `True` or `False`      | If the task failed                            |
| id     | The id of the resource |                                               |

Example for datacenter resource:

```
{
    "action": "delete",
    "changed": true,
    "failed": false,
    "id": "a8ddad52-bc71-439d-9f56-fc2c103af8f2"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.ionos.com/ansible/usage/returnvalues.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.
