feat: reimplement influx telegrafs with new APIs (#120)

* feat: reimplement `influx telegrafs` with new APIs

* chore: restructure structs for later modification

* refactor: bump openapi & regenerate clients

* refactor: better error output and descriptions

Co-authored-by: Dan Moran <dmoran@influxdata.com>
This commit is contained in:
Dane Strandboge
2021-06-15 14:55:04 -05:00
committed by GitHub
parent 581daaa5ba
commit abe521add0
18 changed files with 2890 additions and 80 deletions

View File

@ -61,10 +61,14 @@ paths:
$ref: "./openapi/src/oss/paths/restore_kv.yml"
/restore/sql:
$ref: "./openapi/src/oss/paths/restore_sql.yml"
/restore/bucket-metadata/{bucketID}:
$ref: "./openapi/src/oss/paths/restore_bucket-metadata_bucketID.yml"
/restore/bucket-metadata:
$ref: "./openapi/src/oss/paths/restore_bucket-metadata.yml"
/restore/shards/{shardID}:
$ref: "./openapi/src/oss/paths/restore_shards_shardID.yml"
"/telegrafs":
$ref: "./openapi/src/common/paths/telegrafs.yml"
"/telegrafs/{telegrafID}":
$ref: "./overrides/paths/telegrafs_telegrafID.yml"
components:
parameters:
TraceSpan:
@ -225,7 +229,15 @@ components:
$ref: "./openapi/src/oss/schemas/SubscriptionManifests.yml"
SubscriptionManifest:
$ref: "./openapi/src/oss/schemas/SubscriptionManifest.yml"
RestoredBucketMappings:
$ref: "./openapi/src/oss/schemas/RestoredBucketMappings.yml"
BucketShardMappings:
$ref: "./openapi/src/oss/schemas/BucketShardMappings.yml"
BucketShardMapping:
$ref: "./openapi/src/oss/schemas/BucketShardMapping.yml"
Telegrafs:
$ref: "./openapi/src/common/schemas/Telegrafs.yml"
TelegrafRequest:
$ref: "./openapi/src/common/schemas/TelegrafRequest.yml"
Telegraf:
$ref: "./openapi/src/common/schemas/Telegraf.yml"

View File

@ -0,0 +1,89 @@
get:
operationId: GetTelegrafsID
tags:
- Telegrafs
summary: Retrieve a Telegraf configuration
parameters:
- $ref: "../../openapi/src/common/parameters/TraceSpan.yml"
- in: path
name: telegrafID
schema:
type: string
required: true
description: The Telegraf configuration ID.
- in: header
name: Accept
required: false
schema:
type: string
default: application/json
enum:
- application/json
responses:
"200":
description: Telegraf configuration details
content:
application/json:
schema:
$ref: "../../openapi/src/common/schemas/Telegraf.yml"
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "../../openapi/src/common/schemas/Error.yml"
put:
operationId: PutTelegrafsID
tags:
- Telegrafs
summary: Update a Telegraf configuration
parameters:
- $ref: "../../openapi/src/common/parameters/TraceSpan.yml"
- in: path
name: telegrafID
schema:
type: string
required: true
description: The Telegraf config ID.
requestBody:
description: Telegraf configuration update to apply
required: true
content:
application/json:
schema:
$ref: "../../openapi/src/common/schemas/TelegrafRequest.yml"
responses:
"200":
description: An updated Telegraf configurations
content:
application/json:
schema:
$ref: "../../openapi/src/common/schemas/Telegraf.yml"
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "../../openapi/src/common/schemas/Error.yml"
delete:
operationId: DeleteTelegrafsID
tags:
- Telegrafs
summary: Delete a Telegraf configuration
parameters:
- $ref: "../../openapi/src/common/parameters/TraceSpan.yml"
- in: path
name: telegrafID
schema:
type: string
required: true
description: The Telegraf configuration ID.
responses:
"204":
description: Delete has been accepted
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "../../openapi/src/common/schemas/Error.yml"