Fortinet white logo
Fortinet white logo

Administration Guide

Get the point usage for VMs

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

username

String (Optional)

The username to authenticate. If not declared, the code will read the environment variable FLEXVM_ACCESS_USERNAME.

password

String (Optional)

The password to authenticate. If not declared, the code will read the environment variable FLEXVM_ACCESS_PASSWORD.

configId

Integer

The ID of the VM configuration.

startDate

String

The start date of the date range to query. Any format that satisfies ISO 8601 is accepted but the recommended format is YYYY-MM-DD.

endDate

String

The end date of the date range to query. Any format that satisfies ISO 8601 is accepted but the recommended format is YYYY-MM-DD.

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

vms

List

The list of virtual machines and their consumed points in the specified date range.

The vms list includes:

Parameter

Type Returned

Description

serialNumber

String

The serial number of the VM.

points

Integer

The total points consumed by the VM in the specified date range.

Get the point usage for VMs

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

username

String (Optional)

The username to authenticate. If not declared, the code will read the environment variable FLEXVM_ACCESS_USERNAME.

password

String (Optional)

The password to authenticate. If not declared, the code will read the environment variable FLEXVM_ACCESS_PASSWORD.

configId

Integer

The ID of the VM configuration.

startDate

String

The start date of the date range to query. Any format that satisfies ISO 8601 is accepted but the recommended format is YYYY-MM-DD.

endDate

String

The end date of the date range to query. Any format that satisfies ISO 8601 is accepted but the recommended format is YYYY-MM-DD.

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

vms

List

The list of virtual machines and their consumed points in the specified date range.

The vms list includes:

Parameter

Type Returned

Description

serialNumber

String

The serial number of the VM.

points

Integer

The total points consumed by the VM in the specified date range.