Fortinet black logo

Administration Guide

Get a list of FortiFlex programs for the account

Get a list of FortiFlex programs for the account

Use the fortiflexvm_programs_list_info module to get a list of VM programs using the provided credentials.

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.

Example

The following is an example use of this module:

- name: Get list of VM Programs for the account
  hosts: localhost
  collections:
    - fortinet.fortiflexvm
  vars:
    username: "<your_own_value>"
    password: "<your_own_value>"
  tasks:
    - name: Get programs list
      fortinet.fortiflexvm.fortiflexvm_programs_list_info:
        username: "{{ username }}"
        password: "{{ password }}"
      register: result

    - name: Display response
      debug:
        var: result.programs

Return values

The following parameters are returned:

Parameter

Type Returned

Description

programs

List

The list of programs associated with the specified user.

The programs list includes:

Parameter

Type Returned

Description

accountId

Integer

The ID of the account associated with the program.

serialNumber

String

The serial number of the program.

startDate

String

The start date of the program.

endDate

String

The end date of the program.

hasSupportCoverage

Boolean

A flag indicating whether the program has support coverage.

Get a list of FortiFlex programs for the account

Use the fortiflexvm_programs_list_info module to get a list of VM programs using the provided credentials.

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.

Example

The following is an example use of this module:

- name: Get list of VM Programs for the account
  hosts: localhost
  collections:
    - fortinet.fortiflexvm
  vars:
    username: "<your_own_value>"
    password: "<your_own_value>"
  tasks:
    - name: Get programs list
      fortinet.fortiflexvm.fortiflexvm_programs_list_info:
        username: "{{ username }}"
        password: "{{ password }}"
      register: result

    - name: Display response
      debug:
        var: result.programs

Return values

The following parameters are returned:

Parameter

Type Returned

Description

programs

List

The list of programs associated with the specified user.

The programs list includes:

Parameter

Type Returned

Description

accountId

Integer

The ID of the account associated with the program.

serialNumber

String

The serial number of the program.

startDate

String

The start date of the program.

endDate

String

The end date of the program.

hasSupportCoverage

Boolean

A flag indicating whether the program has support coverage.