Fortinet black logo

Administration Guide

Update an existing entitlement

Update an existing entitlement

Use the fortiflexvm_entitlements_update module to 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.

serialNumber

String

The serial number of the entitlement to update.

configId

Integer (Optional)

The ID of the configuration.

description

String (Optional)

The description of the entitlement.

endDate

String (Optional)

The end date of the entitlement's validity. Any format that satisfies ISO 8601 is accepted but the recommended format is YYYY-MM-DDThh:mm:ss.

status

String (Optional)

The status of the entitlement. The available options are "ACTIVE" or "STOPPED".

Example

The following is an example use of this module:

- name: Update entitlement
  hosts: localhost
  collections:
    - fortinet.fortiflexvm
  vars:
    username: "<your_own_value>"
    password: "<your_own_value>"
  tasks:
    - name: Update an entitlement.
      fortinet.fortiflexvm.fortiflexvm_entitlements_update:
        username: "{{ username }}"
        password: "{{ password }}"
        serialNumber: "FGVMMLTM23001324"
        # Please specify configId if you want to update configId, description or endDate
        configId: 3196
        description: "Modify through Ansible" # Optional.
        endDate: "2023-12-12T00:00:00"  # Optional. If not set, it will use the program end date automatically.
        status: "ACTIVE" # ACTIVE or STOPPED
      register: result

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

Return values

The following parameters are returned:

Parameter

Type Returned

Description

entitlements

List

The entitlement you update. This list only contains one entitlement.

The entitlements list includes:

Parameter

Type Returned

Description

serialNumber

String

The serial number of the entitlement.

description

String

The description of the entitlement.

configId

Integer

The configuration ID of the entitlement.

startDate

String

The start date of the entitlement.

endDate

String

The end date of the entitlement.

status

String

The status of the entitlement; either "PENDING", "ACTIVE", "STOPPED", or "EXPIRED".

token

String

The token of the entitlement.

tokenStatus

String

The token status of the entitlement; either "NOTUSED" or "USED".

Update an existing entitlement

Use the fortiflexvm_entitlements_update module to 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.

serialNumber

String

The serial number of the entitlement to update.

configId

Integer (Optional)

The ID of the configuration.

description

String (Optional)

The description of the entitlement.

endDate

String (Optional)

The end date of the entitlement's validity. Any format that satisfies ISO 8601 is accepted but the recommended format is YYYY-MM-DDThh:mm:ss.

status

String (Optional)

The status of the entitlement. The available options are "ACTIVE" or "STOPPED".

Example

The following is an example use of this module:

- name: Update entitlement
  hosts: localhost
  collections:
    - fortinet.fortiflexvm
  vars:
    username: "<your_own_value>"
    password: "<your_own_value>"
  tasks:
    - name: Update an entitlement.
      fortinet.fortiflexvm.fortiflexvm_entitlements_update:
        username: "{{ username }}"
        password: "{{ password }}"
        serialNumber: "FGVMMLTM23001324"
        # Please specify configId if you want to update configId, description or endDate
        configId: 3196
        description: "Modify through Ansible" # Optional.
        endDate: "2023-12-12T00:00:00"  # Optional. If not set, it will use the program end date automatically.
        status: "ACTIVE" # ACTIVE or STOPPED
      register: result

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

Return values

The following parameters are returned:

Parameter

Type Returned

Description

entitlements

List

The entitlement you update. This list only contains one entitlement.

The entitlements list includes:

Parameter

Type Returned

Description

serialNumber

String

The serial number of the entitlement.

description

String

The description of the entitlement.

configId

Integer

The configuration ID of the entitlement.

startDate

String

The start date of the entitlement.

endDate

String

The end date of the entitlement.

status

String

The status of the entitlement; either "PENDING", "ACTIVE", "STOPPED", or "EXPIRED".

token

String

The token of the entitlement.

tokenStatus

String

The token status of the entitlement; either "NOTUSED" or "USED".