Add SetupKey usage limit (#605)

Add a usage_limit parameter to the API.
This limits the number of times a setup key
can be used. 
usage_limit == 0 indicates the the usage is inlimited.
This commit is contained in:
Misha Bragin
2022-12-05 13:09:59 +01:00
committed by GitHub
parent d2d5d4b4b9
commit d1b7c23b19
8 changed files with 65 additions and 31 deletions

View File

@@ -193,6 +193,9 @@ components:
description: Setup key last update date
type: string
format: date-time
usage_limit:
description: A number of times this key can be used. The value of 0 indicates the unlimited usage.
type: integer
required:
- id
- key
@@ -206,6 +209,7 @@ components:
- state
- auto_groups
- updated_at
- usage_limit
SetupKeyRequest:
type: object
properties:
@@ -226,12 +230,16 @@ components:
type: array
items:
type: string
usage_limit:
description: A number of times this key can be used. The value of 0 indicates the unlimited usage.
type: integer
required:
- name
- type
- expires_in
- revoked
- auto_groups
- usage_limit
GroupMinimum:
type: object
properties: