Fortinet black logo

Administration Guide

Get a list of FortiFlex programs

Get a list of FortiFlex programs

Use the fortiflexvm_programs_list_info module to get a list of FortiFlex 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 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 entitlement you update. This list only contains one entitlement. It will be empty if you set regenerate as false.

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 or not.

Get a list of FortiFlex programs

Use the fortiflexvm_programs_list_info module to get a list of FortiFlex 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 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 entitlement you update. This list only contains one entitlement. It will be empty if you set regenerate as false.

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 or not.