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 |
---|---|---|
|
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 a FortiFlex configuration. |
|
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 |
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 |
---|---|---|
|
List |
A list of hardware entitlements and their details. |
The entitlements
list includes:
Parameter |
Type Returned |
Description |
---|---|---|
|
Integer |
The ID of the entitlement configuration. |
|
String |
The description of the hardware entitlement. |
|
String |
The end date of the hardware entitlement. |
serialNumber
|
String |
The serial number of the hardware. |
|
String |
The start date of the hardware entitlement. |
|
String |
The status of the hardware entitlement. |
|
String |
The token assigned to the hardware entitlement. |
|
String |
The status of the token assigned to the hardware entitlement. |