Get the point usage for VMs
Use the fortiflexvm_vms_points_info
module to get the total points consumed by one or more VMs in a date range.
Parameters
The following parameters are included:
Parameter |
Type |
Description |
---|---|---|
|
String (Optional) |
The username to authenticate. If not declared, the code will read the environment variable |
password
|
String (Optional) |
The password to authenticate. If not declared, the code will read the environment variable |
|
Integer |
The ID of the VM configuration. |
|
String |
The start date of the date range to query. Any format that satisfies ISO 8601 is accepted but the recommended format is |
|
String |
The end date of the date range to query. Any format that satisfies ISO 8601 is accepted but the recommended format is |
Example
The following is an example use of this module:
- name: Get point usage for VMs hosts: localhost collections: - fortinet.fortiflexvm vars: username: "<your_own_value>" password: "<your_own_value>" tasks: - name: Get VMs points fortinet.fortiflexvm.fortiflexvm_vms_points_info: username: "{{ username }}" password: "{{ password }}" configId: 25 startDate: "2020-10-01" endDate: "2020-10-25" register: result - name: Display response debug: var: result.vms
Return values
The following parameters are returned:
Parameter |
Type Returned |
Description |
---|---|---|
|
List |
The list of virtual machines and their consumed points in the specified date range. |
The vms
list includes:
Parameter |
Type Returned |
Description |
---|---|---|
|
String |
The serial number of the VM. |
|
Integer |
The total points consumed by the VM in the specified date range. |