# rubrik\_managed\_volume

## rubrik\_managed\_volume

Begin or end snapshots on a Rubrik Managed Volume.

`Requirement: Rubrik Python SDK (pip install rubrik_cdm)`

## Example

```yaml
# Begin a new managed volume snapshot.
- rubrik_managed_volume:
    name: MV1
    action: begin

# End the managed volume snapshot
- rubrik_managed_volume:
    name: MV1
    action: end
```

## Arugments

### Common

| Name       | Description                                                                                                                                                                                                                                                                                                  | Default |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- |
| node\_ip   | The DNS hostname or IP address of the Rubrik cluster. By defeault, the module will attempt to read this value from the rubrik\_cdm\_node\_ip environment variable. If this environment variable is not present it will need to be manually specified here or in the \`provider' parameter.                   |         |
| password   | The password used to authenticate the connection to the Rubrik cluster. By defeault, the module will attempt to read this value from the rubrik\_cdm\_password environment variable. If this environment variable is not present it will need to be manually specified here or in the \`provider' parameter. |         |
| username   | The username used to authenticate the connection to the Rubrik cluster. By defeault, the module will attempt to read this value from the rubrik\_cdm\_username environment variable. If this environment variable is not present it will need to be manually specified here or in the \`provider' parameter. |         |
| api\_token | The api token used to authenticate the connection to the Rubrik cluster. By defeault, the module will attempt to read this value from the rubrik\_cdm\_token environment variable. If this environment variable is not present it will need to be manually specified here or in the \`provider' parameter.   |         |
| provider   | Convenience method that allows all connection arguments (`node_ip',`username', \`password') to be passed as a dict object. By default, the module will attempt to read these parameters from the rubrik\_cdm\_node\_ip, rubrik\_cdm\_username, and rubrik\_cdm\_password environment variables.              |         |

| Note: The `username` and `password` must be supplied together and may not be provided if the `api_token` variable is present |
| ---------------------------------------------------------------------------------------------------------------------------- |

### Module Specific

| Name                  | Description                                                                                                                                                                    | Default | Type   | Choices    | Mandatory | Aliases |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- | ------ | ---------- | --------- | ------- |
| action                | Specify whether or not you wish to begin or end a snapshot.                                                                                                                    |         | string | being, end | true      |         |
| managed\_volume\_name | The name of the Managed Volume to begin or end the snapshot on.                                                                                                                |         |        |            | true      | name    |
| sla\_name             | The SLA Domain name you want to assign the snapshot to. By default, the currently assigned SLA Domain will be used. This parameter is only required when the \`action' is end. | current | string |            |           |         |
|                       |                                                                                                                                                                                |         |        |            |           |         |
|                       |                                                                                                                                                                                |         |        |            |           |         |
| timeout               | The number of seconds to wait to establish a connection the Rubrik cluster before returning a timeout error.                                                                   | 15      | int    |            |           |         |

## Return Values

| Name     | Description                                                                              | Returned                                                           | Type   |
| -------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ------ |
| response | The full API response for POST /internal/managed\_volume/{id}/begin\_snapshot            | on success when action is begin                                    | dict   |
| response | The full API response for POST /internal/managed\_volume/{id}/end\_snapshot              | on success when action is end                                      | dict   |
| response | A "No changed require" message when the managed volume is already in a writable state.   | When the module idempotent check is succesful and action is begin. | string |
| response | A "No changed required" message when the managed volume is already in a read only state. | When the module idempotent check is succesful and action is begin. | string |


---

# 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://rubrik.gitbook.io/rubrik-modules-for-ansible/modules/rubrik_managed_volume.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.
