Fortinet white logo
Fortinet white logo

Administration Guide

Create hardware entitlements based on a FortiFlex configuration

Create hardware entitlements based on a FortiFlex configuration

Use the fortiflexvm_entitlements_harwdare_create module to create hardware entitlements based on a FortiFlex configuration. This API is only used to create one or more hardware entitlements. To modify an entitlement, see Update an existing entitlement.

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 a FortiFlex configuration.

serialNumbers

String

A list of hardware serial numbers.

endDate

String (Optional)

The end date of the virtual machines. Any format that satisfies ISO 8601 is accepted but the recommended format is YYYY-MM-DDThh:mm:ss. The end date cannot be before today's date or after the program's end date. If it is not specific, the program's end date will be used automatically.

Example

The following is an example use of this module:

- name: Create hardware entitlements
  hosts: localhost
  collections:
    - fortinet.fortiflexvm
  vars_files:
    - vars/vars.yml
  tasks:
    - name: Create hardware entitlements
      fortinet.fortiflexvm.fortiflexvm_entitlements_hardware_create:
        username: "{{ username }}"
        password: "{{ password }}"
        configId: 42
        serialNumbers:
          - "FGT60FTK19000010"
          - "FGT60FTK19000013"
        endDate: "2023-11-11T00:00:00"
      register: result

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

Return values

The following parameters are returned:

Parameter

Type Returned

Description

entitlments

List

A list of hardware entitlements and their details.

The entitlements list includes:

Parameter

Type Returned

Description

configId

Integer

The ID of the entitlement configuration.

description

String

The description of the hardware entitlement.

endDate

String

The end date of the hardware entitlement.

serialNumber

String

The serial number of the hardware.

startDate

String

The start date of the hardware entitlement.

status

String

The status of the hardware entitlement.

token

String

The token assigned to the hardware entitlement.

tokenStatus

String

The status of the token assigned to the hardware entitlement.

Create hardware entitlements based on a FortiFlex configuration

Create hardware entitlements based on a FortiFlex configuration

Use the fortiflexvm_entitlements_harwdare_create module to create hardware entitlements based on a FortiFlex configuration. This API is only used to create one or more hardware entitlements. To modify an entitlement, see Update an existing entitlement.

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 a FortiFlex configuration.

serialNumbers

String

A list of hardware serial numbers.

endDate

String (Optional)

The end date of the virtual machines. Any format that satisfies ISO 8601 is accepted but the recommended format is YYYY-MM-DDThh:mm:ss. The end date cannot be before today's date or after the program's end date. If it is not specific, the program's end date will be used automatically.

Example

The following is an example use of this module:

- name: Create hardware entitlements
  hosts: localhost
  collections:
    - fortinet.fortiflexvm
  vars_files:
    - vars/vars.yml
  tasks:
    - name: Create hardware entitlements
      fortinet.fortiflexvm.fortiflexvm_entitlements_hardware_create:
        username: "{{ username }}"
        password: "{{ password }}"
        configId: 42
        serialNumbers:
          - "FGT60FTK19000010"
          - "FGT60FTK19000013"
        endDate: "2023-11-11T00:00:00"
      register: result

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

Return values

The following parameters are returned:

Parameter

Type Returned

Description

entitlments

List

A list of hardware entitlements and their details.

The entitlements list includes:

Parameter

Type Returned

Description

configId

Integer

The ID of the entitlement configuration.

description

String

The description of the hardware entitlement.

endDate

String

The end date of the hardware entitlement.

serialNumber

String

The serial number of the hardware.

startDate

String

The start date of the hardware entitlement.

status

String

The status of the hardware entitlement.

token

String

The token assigned to the hardware entitlement.

tokenStatus

String

The status of the token assigned to the hardware entitlement.