> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/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/cloud/tools-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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ionos.com/cloud/tools-ansible/usage/returnvalues.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
