fortiflexvm_groups_nexttoken_info - Get net available (unused) token.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.. versionadded:: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
Returns first available token by asset folder or Configuration id (folder path, or config id or both can be specified in request).
Requirements
------------
The below requirements are needed on the host that executes this module.
- ansible>=2.15
Parameters
----------
.. raw:: html
- username The username to authenticate. If not declared, the code will read the environment variable FORTIFLEX_ACCESS_USERNAME.type: str
- password The password to authenticate. If not declared, the code will read the environment variable FORTIFLEX_ACCESS_PASSWORD.type: str
- accountId Account ID. Please declare at least one of the two arguments, accountId or configId.type: str
- configId The ID of a Flex VM Configuration. Please declare at least one of the two arguments, accountId or configId.type: int
- folderPath Folder path.type: str
- status Filter option. A list. Possible values are "ACTIVE", "PENDDING", "STOPPED" and "EXPIRED".type: list
Examples
-------------
.. code-block:: yaml
- name: Get next available (unused) token
hosts: localhost
vars:
username: ""
password: ""
tasks:
- name: Get groups nexttoken
fortinet.fortiflexvm.fortiflexvm_groups_nexttoken_info:
username: "{{ username }}"
password: "{{ password }}"
# Please declare at least one of the following two arguments: accountId or configId.
# You can comment at most one argument that you don't want to specify.
configId: 22
# accountId: 12345
# Optional parameters
folderPath: "My Assets"
status: ["ACTIVE", "PENDING"] # "ACTIVE", "PENDING", "STOPPED", "EXPIRED"
register: result
- name: Display response
ansible.builtin.debug:
var: result.entitlements
Return Values
-------------
.. raw:: html
- entitlements Next available (unused) token. This list only has one element.type: listreturned: always
- accountId Account ID.type: intreturned: if specified account ID in the argument
- configId The config ID of the entitlement.type: intreturned: always
- description The description of the entitlement.type: strreturned: always
- endDate The end date of the entitlement.type: strreturned: always
- serialNumber The serial number of the entitlement.type: strreturned: always
- startDate The start date of the entitlement.type: strreturned: always
- status The status of the entitlement. Possible values are "PENDING", "ACTIVE", "STOPPED" or "EXPIRED".type: strreturned: always
- token The token of the entitlement.type: strreturned: always
- tokenStatus The token status of the entitlement.type: strreturned: always
Authors
-------
- Xinwei Du (@dux-fortinet)
.. hint::
If you notice any issues in this documentation, you can create a pull request to improve it.