From 754fce1786e1447290cf5e4bdad4c75d7f259bc8 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Fri, 14 Oct 2022 08:21:40 +0000 Subject: [PATCH] Add support for confluent cloud integration (#813) Co-authored-by: ci.datadog-api-spec Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 594 +++++++ .../frozen.json | 1 + .../recording.har | 162 ++ .../frozen.json | 1 + .../recording.har | 152 ++ .../frozen.json | 1 + .../recording.har | 152 ++ .../frozen.json | 1 + .../recording.har | 152 ++ .../frozen.json | 1 + .../recording.har | 162 ++ .../confluent-cloud/CreateConfluentAccount.ts | 37 + .../CreateConfluentResource.ts | 35 + .../confluent-cloud/DeleteConfluentAccount.ts | 21 + .../DeleteConfluentAccount_2919241291.ts | 25 + .../v2/confluent-cloud/GetConfluentAccount.ts | 25 + .../confluent-cloud/GetConfluentResource.ts | 22 + .../confluent-cloud/ListConfluentAccount.ts | 17 + .../confluent-cloud/ListConfluentResource.ts | 21 + .../confluent-cloud/UpdateConfluentAccount.ts | 37 + .../UpdateConfluentResource.ts | 32 + features/v2/confluent_cloud.feature | 243 +++ features/v2/given.json | 12 + features/v2/undo.json | 67 + .../apis/ConfluentCloudApi.ts | 1453 +++++++++++++++++ packages/datadog-api-client-v2/index.ts | 33 + .../models/ConfluentAccountCreateRequest.ts | 43 + ...ConfluentAccountCreateRequestAttributes.ts | 68 + .../ConfluentAccountCreateRequestData.ts | 53 + .../ConfluentAccountResourceAttributes.ts | 57 + .../models/ConfluentAccountResponse.ts | 42 + .../ConfluentAccountResponseAttributes.ts | 59 + .../models/ConfluentAccountResponseData.ts | 62 + .../models/ConfluentAccountType.ts | 8 + .../models/ConfluentAccountUpdateRequest.ts | 43 + ...ConfluentAccountUpdateRequestAttributes.ts | 59 + .../ConfluentAccountUpdateRequestData.ts | 53 + .../models/ConfluentAccountsResponse.ts | 42 + .../models/ConfluentResourceRequest.ts | 43 + .../ConfluentResourceRequestAttributes.ts | 49 + .../models/ConfluentResourceRequestData.ts | 62 + .../models/ConfluentResourceResponse.ts | 42 + .../ConfluentResourceResponseAttributes.ts | 50 + .../models/ConfluentResourceResponseData.ts | 62 + .../models/ConfluentResourceType.ts | 8 + .../models/ConfluentResourcesResponse.ts | 42 + .../models/ObjectSerializer.ts | 40 + 48 files changed, 4450 insertions(+), 4 deletions(-) create mode 100644 cassettes/v2/Confluent-Cloud_3346528008/Add-resource-to-Confluent-account-returns-OK-response_877912458/frozen.json create mode 100644 cassettes/v2/Confluent-Cloud_3346528008/Add-resource-to-Confluent-account-returns-OK-response_877912458/recording.har create mode 100644 cassettes/v2/Confluent-Cloud_3346528008/Delete-resource-from-Confluent-account-returns-OK-response_2011811857/frozen.json create mode 100644 cassettes/v2/Confluent-Cloud_3346528008/Delete-resource-from-Confluent-account-returns-OK-response_2011811857/recording.har create mode 100644 cassettes/v2/Confluent-Cloud_3346528008/Get-Confluent-account-returns-OK-response_3429814760/frozen.json create mode 100644 cassettes/v2/Confluent-Cloud_3346528008/Get-Confluent-account-returns-OK-response_3429814760/recording.har create mode 100644 cassettes/v2/Confluent-Cloud_3346528008/List-Confluent-accounts-returns-OK-response_970013899/frozen.json create mode 100644 cassettes/v2/Confluent-Cloud_3346528008/List-Confluent-accounts-returns-OK-response_970013899/recording.har create mode 100644 cassettes/v2/Confluent-Cloud_3346528008/Update-Confluent-account-returns-OK-response_1205465903/frozen.json create mode 100644 cassettes/v2/Confluent-Cloud_3346528008/Update-Confluent-account-returns-OK-response_1205465903/recording.har create mode 100644 examples/v2/confluent-cloud/CreateConfluentAccount.ts create mode 100644 examples/v2/confluent-cloud/CreateConfluentResource.ts create mode 100644 examples/v2/confluent-cloud/DeleteConfluentAccount.ts create mode 100644 examples/v2/confluent-cloud/DeleteConfluentAccount_2919241291.ts create mode 100644 examples/v2/confluent-cloud/GetConfluentAccount.ts create mode 100644 examples/v2/confluent-cloud/GetConfluentResource.ts create mode 100644 examples/v2/confluent-cloud/ListConfluentAccount.ts create mode 100644 examples/v2/confluent-cloud/ListConfluentResource.ts create mode 100644 examples/v2/confluent-cloud/UpdateConfluentAccount.ts create mode 100644 examples/v2/confluent-cloud/UpdateConfluentResource.ts create mode 100644 features/v2/confluent_cloud.feature create mode 100644 packages/datadog-api-client-v2/apis/ConfluentCloudApi.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentAccountCreateRequest.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentAccountCreateRequestAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentAccountCreateRequestData.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentAccountResourceAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentAccountResponse.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentAccountResponseAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentAccountResponseData.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentAccountType.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequest.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequestAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequestData.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentAccountsResponse.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentResourceRequest.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentResourceRequestAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentResourceRequestData.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentResourceResponse.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentResourceResponseAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentResourceResponseData.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentResourceType.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentResourcesResponse.ts diff --git a/.apigentools-info b/.apigentools-info index 2f8b24362f6..ed697ac3328 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2022-10-13 07:12:26.552226", - "spec_repo_commit": "1bcaf2a0" + "regenerated": "2022-10-14 07:44:07.160999", + "spec_repo_commit": "13ac1a3a" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2022-10-13 07:12:26.568101", - "spec_repo_commit": "1bcaf2a0" + "regenerated": "2022-10-14 07:44:07.182199", + "spec_repo_commit": "13ac1a3a" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 327150b97a5..3b4ca5011ca 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -145,6 +145,20 @@ components: required: true schema: type: string + ConfluentAccountID: + description: Confluent Account id. + in: path + name: account_id + required: true + schema: + type: string + ConfluentResourceID: + description: Confluent Account Resource ID. + in: path + name: resource_id + required: true + schema: + type: string IncidentAttachmentFilterQueryParameter: description: Specifies which types of attachments are included in the response. explode: false @@ -1295,6 +1309,287 @@ components: $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleData' type: array type: object + ConfluentAccountCreateRequest: + description: Payload schema when adding a Confluent account. + properties: + data: + $ref: '#/components/schemas/ConfluentAccountCreateRequestData' + required: + - data + type: object + ConfluentAccountCreateRequestAttributes: + description: Attributes associated with the account creation request. + properties: + api_key: + description: The API key associated with your Confluent account. + example: TESTAPIKEY123 + type: string + api_secret: + description: The API secret associated with your Confluent account. + example: test-api-secret-123 + type: string + resources: + description: A list of Confluent resources associated with the Confluent + account. + items: + $ref: '#/components/schemas/ConfluentAccountResourceAttributes' + type: array + tags: + description: A list of strings representing tags. Can be a single key, or + key-value pairs separated by a colon. + example: + - myTag + - myTag2:myValue + items: + type: string + type: array + required: + - api_key + - api_secret + type: object + ConfluentAccountCreateRequestData: + description: The data body for adding a Confluent account. + properties: + attributes: + $ref: '#/components/schemas/ConfluentAccountCreateRequestAttributes' + type: + $ref: '#/components/schemas/ConfluentAccountType' + required: + - attributes + - type + type: object + ConfluentAccountResourceAttributes: + description: Attributes object for updating a Confluent resource. + properties: + id: + description: The ID associated with a Confluent resource. + example: resource-id-123 + type: string + resource_type: + description: The resource type of the Resource. Can be `kafka`, `connector`, + `ksql`, or `schema_registry`. + example: kafka + type: string + tags: + description: A list of strings representing tags. Can be a single key, or + key-value pairs separated by a colon. + example: + - myTag + - myTag2:myValue + items: + type: string + type: array + type: object + ConfluentAccountResponse: + description: The expected response schema when getting a Confluent account. + properties: + data: + $ref: '#/components/schemas/ConfluentAccountResponseData' + type: object + ConfluentAccountResponseAttributes: + description: The attributes of a Confluent account. + properties: + api_key: + description: The API key associated with your Confluent account. + example: TESTAPIKEY123 + type: string + resources: + description: A list of Confluent resources associated with the Confluent + account. + items: + $ref: '#/components/schemas/ConfluentResourceResponseAttributes' + type: array + tags: + description: A list of strings representing tags. Can be a single key, or + key-value pairs separated by a colon. + example: + - myTag + - myTag2:myValue + items: + type: string + type: array + required: + - api_key + type: object + ConfluentAccountResponseData: + description: An API key and API secret pair that represents a Confluent account. + properties: + attributes: + $ref: '#/components/schemas/ConfluentAccountResponseAttributes' + id: + description: A randomly generated ID associated with a Confluent account. + example: account_id_abc123 + type: string + type: + $ref: '#/components/schemas/ConfluentAccountType' + required: + - attributes + - id + - type + type: object + ConfluentAccountType: + default: confluent-cloud-accounts + description: The JSON:API type for this API. Should always be `confluent-cloud-accounts`. + enum: + - confluent-cloud-accounts + example: confluent-cloud-accounts + type: string + x-enum-varnames: + - CONFLUENT_CLOUD_ACCOUNTS + ConfluentAccountUpdateRequest: + description: The JSON:API request for updating a Confluent account. + properties: + data: + $ref: '#/components/schemas/ConfluentAccountUpdateRequestData' + required: + - data + type: object + ConfluentAccountUpdateRequestAttributes: + description: Attributes object for updating a Confluent account. + properties: + api_key: + description: The API key associated with your Confluent account. + example: TESTAPIKEY123 + type: string + api_secret: + description: The API secret associated with your Confluent account. + example: test-api-secret-123 + type: string + tags: + description: A list of strings representing tags. Can be a single key, or + key-value pairs separated by a colon. + example: + - myTag + - myTag2:myValue + items: + type: string + type: array + required: + - api_key + - api_secret + type: object + ConfluentAccountUpdateRequestData: + description: Data object for updating a Confluent account. + properties: + attributes: + $ref: '#/components/schemas/ConfluentAccountUpdateRequestAttributes' + type: + $ref: '#/components/schemas/ConfluentAccountType' + required: + - attributes + - type + type: object + ConfluentAccountsResponse: + description: Confluent account returned by the API. + properties: + data: + description: The Confluent account. + items: + $ref: '#/components/schemas/ConfluentAccountResponseData' + type: array + type: object + ConfluentResourceRequest: + description: The JSON:API request for updating a Confluent resource. + properties: + data: + $ref: '#/components/schemas/ConfluentResourceRequestData' + required: + - data + type: object + ConfluentResourceRequestAttributes: + description: Attributes object for updating a Confluent resource. + properties: + resource_type: + description: The resource type of the Resource. Can be `kafka`, `connector`, + `ksql`, or `schema_registry`. + example: kafka + type: string + tags: + description: A list of strings representing tags. Can be a single key, or + key-value pairs separated by a colon. + example: + - myTag + - myTag2:myValue + items: + type: string + type: array + type: object + ConfluentResourceRequestData: + description: JSON:API request for updating a Confluent resource. + properties: + attributes: + $ref: '#/components/schemas/ConfluentResourceRequestAttributes' + id: + description: The ID associated with a Confluent resource. + example: resource-id-123 + type: string + type: + $ref: '#/components/schemas/ConfluentResourceType' + required: + - attributes + - type + - id + type: object + ConfluentResourceResponse: + description: Response schema when interacting with a Confluent resource. + properties: + data: + $ref: '#/components/schemas/ConfluentResourceResponseData' + type: object + ConfluentResourceResponseAttributes: + description: Model representation of a Confluent Cloud resource. + properties: + resource_type: + description: The resource type of the Resource. Can be `kafka`, `connector`, + `ksql`, or `schema_registry`. + example: kafka + type: string + tags: + description: A list of strings representing tags. Can be a single key, or + key-value pairs separated by a colon. + example: + - myTag + - myTag2:myValue + items: + type: string + type: array + required: + - resource_type + type: object + ConfluentResourceResponseData: + description: Confluent Cloud resource data. + properties: + attributes: + $ref: '#/components/schemas/ConfluentResourceResponseAttributes' + id: + description: The ID associated with the Confluent resource. + example: resource_id_abc123 + type: string + type: + $ref: '#/components/schemas/ConfluentResourceType' + required: + - attributes + - type + - id + type: object + ConfluentResourceType: + default: confluent-cloud-resources + description: The JSON:API type for this request. + enum: + - confluent-cloud-resources + example: confluent-cloud-resources + type: string + x-enum-varnames: + - CONFLUENT_CLOUD_RESOURCES + ConfluentResourcesResponse: + description: Response schema when interacting with a list of Confluent resources. + properties: + data: + description: The JSON:API data attribute. + items: + $ref: '#/components/schemas/ConfluentResourceResponseData' + type: array + type: object ContentEncoding: description: HTTP header used to compress the media-type. enum: @@ -10776,6 +11071,302 @@ paths: tags: - Opsgenie Integration x-codegen-request-body-name: body + /api/v2/integrations/confluent-cloud/accounts: + get: + description: List Confluent accounts. + operationId: ListConfluentAccount + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentAccountsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List Confluent accounts + tags: + - Confluent Cloud + post: + description: Create a Confluent account. + operationId: CreateConfluentAccount + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentAccountCreateRequest' + description: Confluent payload + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentAccountResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Add Confluent account + tags: + - Confluent Cloud + x-codegen-request-body-name: body + /api/v2/integrations/confluent-cloud/accounts/{account_id}: + delete: + description: Delete a Confluent account with the provided account ID. + operationId: DeleteConfluentAccount + parameters: + - $ref: '#/components/parameters/ConfluentAccountID' + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete Confluent account + tags: + - Confluent Cloud + get: + description: Get the Confluent account with the provided account ID. + operationId: GetConfluentAccount + parameters: + - $ref: '#/components/parameters/ConfluentAccountID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentAccountResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get Confluent account + tags: + - Confluent Cloud + patch: + description: Update the Confluent account with the provided account ID. + operationId: UpdateConfluentAccount + parameters: + - $ref: '#/components/parameters/ConfluentAccountID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentAccountUpdateRequest' + description: Confluent payload + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentAccountResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update Confluent account + tags: + - Confluent Cloud + x-codegen-request-body-name: body + /api/v2/integrations/confluent-cloud/accounts/{account_id}/resources: + get: + description: Get a Confluent resource for the account associated with the provided + ID. + operationId: ListConfluentResource + parameters: + - $ref: '#/components/parameters/ConfluentAccountID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentResourcesResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List Confluent Account resources + tags: + - Confluent Cloud + post: + description: Create a Confluent resource for the account associated with the + provided ID. + operationId: CreateConfluentResource + parameters: + - $ref: '#/components/parameters/ConfluentAccountID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentResourceRequest' + description: Confluent payload + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentResourceResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Add resource to Confluent account + tags: + - Confluent Cloud + x-codegen-request-body-name: body + /api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}: + delete: + description: Delete a Confluent resource with the provided resource id for the + account associated with the provided account ID. + operationId: DeleteConfluentResource + parameters: + - $ref: '#/components/parameters/ConfluentAccountID' + - $ref: '#/components/parameters/ConfluentResourceID' + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete resource from Confluent account + tags: + - Confluent Cloud + get: + description: Get a Confluent resource with the provided resource id for the + account associated with the provided account ID. + operationId: GetConfluentResource + parameters: + - $ref: '#/components/parameters/ConfluentAccountID' + - $ref: '#/components/parameters/ConfluentResourceID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentResourceResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get resource from Confluent account + tags: + - Confluent Cloud + patch: + description: Update a Confluent resource with the provided resource id for the + account associated with the provided account ID. + operationId: UpdateConfluentResource + parameters: + - $ref: '#/components/parameters/ConfluentAccountID' + - $ref: '#/components/parameters/ConfluentResourceID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentResourceRequest' + description: Confluent payload + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentResourceResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update resource in Confluent account + tags: + - Confluent Cloud + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - STANDARD /api/v2/logs: post: description: 'Send your logs to your Datadog platform over HTTP. Limits per @@ -15737,6 +16328,9 @@ tags: - description: Workload activity security rules for generating events using the Datadog security Agent. name: Cloud Workload Security +- description: Configure your Datadog Confluent Cloud integration directly through + the Datadog API. + name: Confluent Cloud - description: 'Interact with your dashboard lists through the API to organize, find, and share all of your dashboards with your team and diff --git a/cassettes/v2/Confluent-Cloud_3346528008/Add-resource-to-Confluent-account-returns-OK-response_877912458/frozen.json b/cassettes/v2/Confluent-Cloud_3346528008/Add-resource-to-Confluent-account-returns-OK-response_877912458/frozen.json new file mode 100644 index 00000000000..9c26521efff --- /dev/null +++ b/cassettes/v2/Confluent-Cloud_3346528008/Add-resource-to-Confluent-account-returns-OK-response_877912458/frozen.json @@ -0,0 +1 @@ +"2022-10-06T21:02:44.122Z" diff --git a/cassettes/v2/Confluent-Cloud_3346528008/Add-resource-to-Confluent-account-returns-OK-response_877912458/recording.har b/cassettes/v2/Confluent-Cloud_3346528008/Add-resource-to-Confluent-account-returns-OK-response_877912458/recording.har new file mode 100644 index 00000000000..2d852ccfe63 --- /dev/null +++ b/cassettes/v2/Confluent-Cloud_3346528008/Add-resource-to-Confluent-account-returns-OK-response_877912458/recording.har @@ -0,0 +1,162 @@ +{ + "log": { + "_recordingName": "Confluent Cloud/Add resource to Confluent account returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "db35ffb782a0fd3396ecfd786d3ebd61", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 283, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 594, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"api_key\":\"TestAddresourcetoConfluentaccountreturnsOKresponse1665090164\",\"api_secret\":\"test-api-secret\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts" + }, + "response": { + "bodySize": 271, + "content": { + "mimeType": "application/json", + "size": 271, + "text": "{\"data\":{\"attributes\":{\"api_key\":\"TestAddresourcetoConfluentaccountreturnsOKresponse1665090164\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"l7mlzljfqc\"}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 631, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2022-10-06T21:02:44.130Z", + "time": 274 + }, + { + "_id": "55c2216004b6a4846778292f3ae8fed9", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 186, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 616, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"resource_type\":\"kafka\",\"tags\":[\"myTag\",\"myTag2:myValue\"]},\"id\":\"testaddresourcetoconfluentaccountreturnsokresponse1665090164\",\"type\":\"confluent-cloud-resources\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts/l7mlzljfqc/resources" + }, + "response": { + "bodySize": 187, + "content": { + "mimeType": "application/json", + "size": 187, + "text": "{\"data\":{\"attributes\":{\"resource_type\":\"kafka\",\"tags\":[\"myTag\",\"myTag2:myValue\"]},\"type\":\"confluent-cloud-resources\",\"id\":\"testaddresourcetoconfluentaccountreturnsokresponse1665090164\"}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 631, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2022-10-06T21:02:44.415Z", + "time": 231 + }, + { + "_id": "2ef975aa8d43d06f1acd9c848145816b", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 541, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts/l7mlzljfqc" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/html; charset=utf-8", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "text/html; charset=utf-8" + } + ], + "headersSize": 621, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2022-10-06T21:02:44.654Z", + "time": 219 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Confluent-Cloud_3346528008/Delete-resource-from-Confluent-account-returns-OK-response_2011811857/frozen.json b/cassettes/v2/Confluent-Cloud_3346528008/Delete-resource-from-Confluent-account-returns-OK-response_2011811857/frozen.json new file mode 100644 index 00000000000..41c93140216 --- /dev/null +++ b/cassettes/v2/Confluent-Cloud_3346528008/Delete-resource-from-Confluent-account-returns-OK-response_2011811857/frozen.json @@ -0,0 +1 @@ +"2022-10-06T21:02:44.888Z" diff --git a/cassettes/v2/Confluent-Cloud_3346528008/Delete-resource-from-Confluent-account-returns-OK-response_2011811857/recording.har b/cassettes/v2/Confluent-Cloud_3346528008/Delete-resource-from-Confluent-account-returns-OK-response_2011811857/recording.har new file mode 100644 index 00000000000..23cbfb5f97c --- /dev/null +++ b/cassettes/v2/Confluent-Cloud_3346528008/Delete-resource-from-Confluent-account-returns-OK-response_2011811857/recording.har @@ -0,0 +1,152 @@ +{ + "log": { + "_recordingName": "Confluent Cloud/Delete resource from Confluent account returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "349f7144af6fd18299ee4bc55c9e7a8f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 288, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 594, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"api_key\":\"TestDeleteresourcefromConfluentaccountreturnsOKresponse1665090164\",\"api_secret\":\"test-api-secret\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts" + }, + "response": { + "bodySize": 276, + "content": { + "mimeType": "application/json", + "size": 276, + "text": "{\"data\":{\"attributes\":{\"api_key\":\"TestDeleteresourcefromConfluentaccountreturnsOKresponse1665090164\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"xxmv3lgki4\"}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 631, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2022-10-06T21:02:44.891Z", + "time": 216 + }, + { + "_id": "dea164b9e96140d01b5e3a00fa14a11d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 541, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts/xxmv3lgki4" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/html; charset=utf-8", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "text/html; charset=utf-8" + } + ], + "headersSize": 621, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2022-10-06T21:02:45.114Z", + "time": 188 + }, + { + "_id": "dea164b9e96140d01b5e3a00fa14a11d", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 541, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts/xxmv3lgki4" + }, + "response": { + "bodySize": 42, + "content": { + "mimeType": "application/json", + "size": 42, + "text": "{\"errors\":[\"Account not found not found\"]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 676, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2022-10-06T21:02:45.308Z", + "time": 155 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Confluent-Cloud_3346528008/Get-Confluent-account-returns-OK-response_3429814760/frozen.json b/cassettes/v2/Confluent-Cloud_3346528008/Get-Confluent-account-returns-OK-response_3429814760/frozen.json new file mode 100644 index 00000000000..6cba2a4f382 --- /dev/null +++ b/cassettes/v2/Confluent-Cloud_3346528008/Get-Confluent-account-returns-OK-response_3429814760/frozen.json @@ -0,0 +1 @@ +"2022-10-06T21:02:45.471Z" diff --git a/cassettes/v2/Confluent-Cloud_3346528008/Get-Confluent-account-returns-OK-response_3429814760/recording.har b/cassettes/v2/Confluent-Cloud_3346528008/Get-Confluent-account-returns-OK-response_3429814760/recording.har new file mode 100644 index 00000000000..a2e7b64a81f --- /dev/null +++ b/cassettes/v2/Confluent-Cloud_3346528008/Get-Confluent-account-returns-OK-response_3429814760/recording.har @@ -0,0 +1,152 @@ +{ + "log": { + "_recordingName": "Confluent Cloud/Get Confluent account returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "664cac629cad7cfe034980ce3082a3e1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 273, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 594, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"api_key\":\"TestGetConfluentaccountreturnsOKresponse1665090165\",\"api_secret\":\"test-api-secret\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts" + }, + "response": { + "bodySize": 261, + "content": { + "mimeType": "application/json", + "size": 261, + "text": "{\"data\":{\"attributes\":{\"api_key\":\"TestGetConfluentaccountreturnsOKresponse1665090165\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"d43d474jxm\"}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 631, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2022-10-06T21:02:45.473Z", + "time": 406 + }, + { + "_id": "e3672a639af49dfb4ff60a8a8bf2168f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 548, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts/d43d474jxm" + }, + "response": { + "bodySize": 261, + "content": { + "mimeType": "application/json", + "size": 261, + "text": "{\"data\":{\"attributes\":{\"api_key\":\"TestGetConfluentaccountreturnsOKresponse1665090165\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"d43d474jxm\"}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 633, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2022-10-06T21:02:45.885Z", + "time": 174 + }, + { + "_id": "14ba4899ea294f17253b507c5e07a486", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 541, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts/d43d474jxm" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/html; charset=utf-8", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "text/html; charset=utf-8" + } + ], + "headersSize": 621, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2022-10-06T21:02:46.069Z", + "time": 194 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Confluent-Cloud_3346528008/List-Confluent-accounts-returns-OK-response_970013899/frozen.json b/cassettes/v2/Confluent-Cloud_3346528008/List-Confluent-accounts-returns-OK-response_970013899/frozen.json new file mode 100644 index 00000000000..ad07483113a --- /dev/null +++ b/cassettes/v2/Confluent-Cloud_3346528008/List-Confluent-accounts-returns-OK-response_970013899/frozen.json @@ -0,0 +1 @@ +"2022-10-06T21:02:46.272Z" diff --git a/cassettes/v2/Confluent-Cloud_3346528008/List-Confluent-accounts-returns-OK-response_970013899/recording.har b/cassettes/v2/Confluent-Cloud_3346528008/List-Confluent-accounts-returns-OK-response_970013899/recording.har new file mode 100644 index 00000000000..52345239aa4 --- /dev/null +++ b/cassettes/v2/Confluent-Cloud_3346528008/List-Confluent-accounts-returns-OK-response_970013899/recording.har @@ -0,0 +1,152 @@ +{ + "log": { + "_recordingName": "Confluent Cloud/List Confluent accounts returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "1ee70549194c7abdd13cf80325a2bfe7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 275, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 594, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1665090166\",\"api_secret\":\"test-api-secret\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts" + }, + "response": { + "bodySize": 263, + "content": { + "mimeType": "application/json", + "size": 263, + "text": "{\"data\":{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1665090166\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"45iw6lb8j5\"}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 631, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2022-10-06T21:02:46.276Z", + "time": 227 + }, + { + "_id": "c57ba11651ca791a2e2ee7c72606dd51", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 538, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts" + }, + "response": { + "bodySize": 14182, + "content": { + "mimeType": "application/json", + "size": 14182, + "text": "{\"data\":[{\"attributes\":{\"api_key\":\"test-api-key3\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"iubtgfayp5\"},{\"attributes\":{\"api_key\":\"Test-List_Confluent_accounts_returns_OK_response-1663015727\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"83wqs4ztwc\"},{\"attributes\":{\"api_key\":\"update-key\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[]},\"type\":\"confluent-cloud-accounts\",\"id\":\"mrwhlq9oyn\"},{\"attributes\":{\"api_key\":\"Test-List_Confluent_accounts_returns_OK_response-1663017017\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"tuwcfwqe3a\"},{\"attributes\":{\"api_key\":\"Test-Update_Confluent_account_returns_OK_response-1663017018\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"bt2li4wmv5\"},{\"attributes\":{\"api_key\":\"Test-List_Confluent_accounts_returns_OK_response-1663017074\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"snrx0cusau\"},{\"attributes\":{\"api_key\":\"Test-Update_Confluent_account_returns_OK_response-1663017075\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"3r136fz38z\"},{\"attributes\":{\"api_key\":\"Test-List_Confluent_accounts_returns_OK_response-1663035571\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"olnygn7t1v\"},{\"attributes\":{\"api_key\":\"Test-Update_Confluent_account_returns_OK_response-1663035572\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"u61jn2zm67\"},{\"attributes\":{\"api_key\":\"testlistconfluentaccountsreturnsokresponse1663035633\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"u0mnbkhpyg\"},{\"attributes\":{\"api_key\":\"testupdateconfluentaccountreturnsokresponse1663035635\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"1qt90nner9\"},{\"attributes\":{\"api_key\":\"testlistconfluentaccountsreturnsokresponse1663040179\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"rn6627go3o\"},{\"attributes\":{\"api_key\":\"testupdateconfluentaccountreturnsokresponse1663040180\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"hkkcrwodz3\"},{\"attributes\":{\"api_key\":\"api-key-test-123\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"m17r8n1brn\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1663081412\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"0ubcaq4ack\"},{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1663081413\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"csu3ol6ewv\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1663091740\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"e8ql5yb6d0\"},{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1663091741\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"frgdwzdkc8\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1663091761\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"hpv6ewnuew\"},{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1663091762\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"19b6yov7hd\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1663092165\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"97agj11bf0\"},{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1663092166\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[]},\"type\":\"confluent-cloud-accounts\",\"id\":\"kn6kq1i4si\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1663092330\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"a8fzei9e85\"},{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1663092331\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"updated_tag:val\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"5wmpn2sx51\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1663092374\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"fb3gmtwadj\"},{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1663092374\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"updated_tag:val\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"qul0ce8yrg\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1663092403\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"9neye26b1h\"},{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1663092404\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"updated_tag:val\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"xaab9w4b72\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1663092495\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"x7en9ipq51\"},{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1663092496\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"updated_tag:val\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"gl1y005ff1\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1663093490\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"4j43efxc7f\"},{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1663093491\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"updated_tag:val\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"nl8es35l6i\"},{\"attributes\":{\"api_key\":\"TestDeleteresourcefromConfluentaccountreturnsOKresponse1663093498\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"9ccf1xtqtr\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1663093499\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"ep3q1okrbl\"},{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1663093500\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"updated_tag:val\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"rqdlsa4bzf\"},{\"attributes\":{\"api_key\":\"TestDeleteresourcefromConfluentaccountreturnsOKresponse1663093577\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"b27wqbnkq3\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1663093578\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"5t6xj8u5i5\"},{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1663093579\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"updated_tag:val\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"8vogxaeno1\"},{\"attributes\":{\"api_key\":\"TestDeleteresourcefromConfluentaccountreturnsOKresponse1663093596\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"krs4zg884i\"},{\"attributes\":{\"api_key\":\"TestDeleteresourcefromConfluentaccountreturnsOKresponse1663093745\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"9f503olewx\"},{\"attributes\":{\"api_key\":\"TestGetConfluentaccountreturnsOKresponse1663094037\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"be2ywpqpmq\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1663094038\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"3uh8kipdh6\"},{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1663094039\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"updated_tag:val\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"z7rgwzsjgb\"},{\"attributes\":{\"api_key\":\"TestGetConfluentaccountreturnsOKresponse1663094133\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"mqq2s2dphs\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1663094134\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"t3rjzkgkog\"},{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1663094135\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"updated_tag:val\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"6dbd2ohnq1\"},{\"attributes\":{\"api_key\":\"TestGetConfluentaccountreturnsOKresponse1663094313\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"r3z2a4u9r0\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1663094314\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"rc2ezuf80r\"},{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1663094315\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"updated_tag:val\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"xttgp0v4l1\"},{\"attributes\":{\"api_key\":\"TestGetConfluentaccountreturnsOKresponse1663094436\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"6w0y04l7pj\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1663094437\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"feibu0b5f3\"},{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1663094438\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"updated_tag:val\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"nb7swpr8g8\"},{\"attributes\":{\"api_key\":\"TestGetConfluentaccountreturnsOKresponse1663180425\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"by22udueep\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1663180426\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"h1s9rgj73z\"},{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1663180426\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"updated_tag:val\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"izxxm263fi\"},{\"attributes\":{\"api_key\":\"TestListConfluentaccountsreturnsOKresponse1665090166\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"45iw6lb8j5\"}]}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 635, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2022-10-06T21:02:46.512Z", + "time": 184 + }, + { + "_id": "f48389ce6dc06760935246fb84a128f6", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 541, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts/45iw6lb8j5" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/html; charset=utf-8", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "text/html; charset=utf-8" + } + ], + "headersSize": 621, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2022-10-06T21:02:46.702Z", + "time": 218 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Confluent-Cloud_3346528008/Update-Confluent-account-returns-OK-response_1205465903/frozen.json b/cassettes/v2/Confluent-Cloud_3346528008/Update-Confluent-account-returns-OK-response_1205465903/frozen.json new file mode 100644 index 00000000000..d3b3b20fb1e --- /dev/null +++ b/cassettes/v2/Confluent-Cloud_3346528008/Update-Confluent-account-returns-OK-response_1205465903/frozen.json @@ -0,0 +1 @@ +"2022-10-06T21:02:46.928Z" diff --git a/cassettes/v2/Confluent-Cloud_3346528008/Update-Confluent-account-returns-OK-response_1205465903/recording.har b/cassettes/v2/Confluent-Cloud_3346528008/Update-Confluent-account-returns-OK-response_1205465903/recording.har new file mode 100644 index 00000000000..85475c30fa9 --- /dev/null +++ b/cassettes/v2/Confluent-Cloud_3346528008/Update-Confluent-account-returns-OK-response_1205465903/recording.har @@ -0,0 +1,162 @@ +{ + "log": { + "_recordingName": "Confluent Cloud/Update Confluent account returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "b4cadd8b72c294690b692232225481d1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 276, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 594, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1665090166\",\"api_secret\":\"test-api-secret\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts" + }, + "response": { + "bodySize": 264, + "content": { + "mimeType": "application/json", + "size": 264, + "text": "{\"data\":{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1665090166\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"ytthkwvtde\"}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 631, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2022-10-06T21:02:46.931Z", + "time": 317 + }, + { + "_id": "7d58433005aa27df99751e012e0139a6", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 181, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 606, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1665090166\",\"api_secret\":\"update-secret\",\"tags\":[\"updated_tag:val\"]},\"type\":\"confluent-cloud-accounts\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts/ytthkwvtde" + }, + "response": { + "bodySize": 263, + "content": { + "mimeType": "application/json", + "size": 263, + "text": "{\"data\":{\"attributes\":{\"api_key\":\"TestUpdateConfluentaccountreturnsOKresponse1665090166\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"updated_tag:val\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"ytthkwvtde\"}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 634, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2022-10-06T21:02:47.256Z", + "time": 237 + }, + { + "_id": "448e0103b239d1cf2dc9637c86839f84", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 541, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integrations/confluent-cloud/accounts/ytthkwvtde" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/html; charset=utf-8", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "text/html; charset=utf-8" + } + ], + "headersSize": 621, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2022-10-06T21:02:47.502Z", + "time": 197 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/confluent-cloud/CreateConfluentAccount.ts b/examples/v2/confluent-cloud/CreateConfluentAccount.ts new file mode 100644 index 00000000000..98adc7e2a3f --- /dev/null +++ b/examples/v2/confluent-cloud/CreateConfluentAccount.ts @@ -0,0 +1,37 @@ +/** + * Add Confluent account returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ConfluentCloudApi(configuration); + +const params: v2.ConfluentCloudApiCreateConfluentAccountRequest = { + body: { + data: { + attributes: { + apiKey: "TESTAPIKEY123", + apiSecret: "test-api-secret-123", + resources: [ + { + id: "resource-id-123", + resourceType: "kafka", + tags: ["myTag", "myTag2:myValue"], + }, + ], + tags: ["myTag", "myTag2:myValue"], + }, + type: "confluent-cloud-accounts", + }, + }, +}; + +apiInstance + .createConfluentAccount(params) + .then((data: v2.ConfluentAccountResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/confluent-cloud/CreateConfluentResource.ts b/examples/v2/confluent-cloud/CreateConfluentResource.ts new file mode 100644 index 00000000000..4e42cf1cabc --- /dev/null +++ b/examples/v2/confluent-cloud/CreateConfluentResource.ts @@ -0,0 +1,35 @@ +/** + * Add resource to Confluent account returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ConfluentCloudApi(configuration); + +// there is a valid "confluent_account" in the system +const CONFLUENT_ACCOUNT_DATA_ID = process.env + .CONFLUENT_ACCOUNT_DATA_ID as string; + +const params: v2.ConfluentCloudApiCreateConfluentResourceRequest = { + body: { + data: { + attributes: { + resourceType: "kafka", + tags: ["myTag", "myTag2:myValue"], + }, + id: "exampleaddresourcetoconfluentaccountreturnsokresponse", + type: "confluent-cloud-resources", + }, + }, + accountId: CONFLUENT_ACCOUNT_DATA_ID, +}; + +apiInstance + .createConfluentResource(params) + .then((data: v2.ConfluentResourceResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/confluent-cloud/DeleteConfluentAccount.ts b/examples/v2/confluent-cloud/DeleteConfluentAccount.ts new file mode 100644 index 00000000000..47d776e77f1 --- /dev/null +++ b/examples/v2/confluent-cloud/DeleteConfluentAccount.ts @@ -0,0 +1,21 @@ +/** + * Delete Confluent account returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ConfluentCloudApi(configuration); + +const params: v2.ConfluentCloudApiDeleteConfluentAccountRequest = { + accountId: "account_id", +}; + +apiInstance + .deleteConfluentAccount(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/confluent-cloud/DeleteConfluentAccount_2919241291.ts b/examples/v2/confluent-cloud/DeleteConfluentAccount_2919241291.ts new file mode 100644 index 00000000000..ca545af056f --- /dev/null +++ b/examples/v2/confluent-cloud/DeleteConfluentAccount_2919241291.ts @@ -0,0 +1,25 @@ +/** + * Delete resource from Confluent account returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ConfluentCloudApi(configuration); + +// there is a valid "confluent_account" in the system +const CONFLUENT_ACCOUNT_DATA_ID = process.env + .CONFLUENT_ACCOUNT_DATA_ID as string; + +const params: v2.ConfluentCloudApiDeleteConfluentAccountRequest = { + accountId: CONFLUENT_ACCOUNT_DATA_ID, +}; + +apiInstance + .deleteConfluentAccount(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/confluent-cloud/GetConfluentAccount.ts b/examples/v2/confluent-cloud/GetConfluentAccount.ts new file mode 100644 index 00000000000..c059eb84705 --- /dev/null +++ b/examples/v2/confluent-cloud/GetConfluentAccount.ts @@ -0,0 +1,25 @@ +/** + * Get Confluent account returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ConfluentCloudApi(configuration); + +// there is a valid "confluent_account" in the system +const CONFLUENT_ACCOUNT_DATA_ID = process.env + .CONFLUENT_ACCOUNT_DATA_ID as string; + +const params: v2.ConfluentCloudApiGetConfluentAccountRequest = { + accountId: CONFLUENT_ACCOUNT_DATA_ID, +}; + +apiInstance + .getConfluentAccount(params) + .then((data: v2.ConfluentAccountResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/confluent-cloud/GetConfluentResource.ts b/examples/v2/confluent-cloud/GetConfluentResource.ts new file mode 100644 index 00000000000..dabe63d59c7 --- /dev/null +++ b/examples/v2/confluent-cloud/GetConfluentResource.ts @@ -0,0 +1,22 @@ +/** + * Get resource from Confluent account returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ConfluentCloudApi(configuration); + +const params: v2.ConfluentCloudApiGetConfluentResourceRequest = { + accountId: "account_id", + resourceId: "resource_id", +}; + +apiInstance + .getConfluentResource(params) + .then((data: v2.ConfluentResourceResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/confluent-cloud/ListConfluentAccount.ts b/examples/v2/confluent-cloud/ListConfluentAccount.ts new file mode 100644 index 00000000000..044a252db31 --- /dev/null +++ b/examples/v2/confluent-cloud/ListConfluentAccount.ts @@ -0,0 +1,17 @@ +/** + * List Confluent accounts returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ConfluentCloudApi(configuration); + +apiInstance + .listConfluentAccount() + .then((data: v2.ConfluentAccountsResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/confluent-cloud/ListConfluentResource.ts b/examples/v2/confluent-cloud/ListConfluentResource.ts new file mode 100644 index 00000000000..12c1b5a6d3f --- /dev/null +++ b/examples/v2/confluent-cloud/ListConfluentResource.ts @@ -0,0 +1,21 @@ +/** + * List Confluent Account resources returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ConfluentCloudApi(configuration); + +const params: v2.ConfluentCloudApiListConfluentResourceRequest = { + accountId: "account_id", +}; + +apiInstance + .listConfluentResource(params) + .then((data: v2.ConfluentResourcesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/confluent-cloud/UpdateConfluentAccount.ts b/examples/v2/confluent-cloud/UpdateConfluentAccount.ts new file mode 100644 index 00000000000..e6b24aab103 --- /dev/null +++ b/examples/v2/confluent-cloud/UpdateConfluentAccount.ts @@ -0,0 +1,37 @@ +/** + * Update Confluent account returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ConfluentCloudApi(configuration); + +// there is a valid "confluent_account" in the system +const CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY = process.env + .CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY as string; +const CONFLUENT_ACCOUNT_DATA_ID = process.env + .CONFLUENT_ACCOUNT_DATA_ID as string; + +const params: v2.ConfluentCloudApiUpdateConfluentAccountRequest = { + body: { + data: { + attributes: { + apiKey: CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY, + apiSecret: "update-secret", + tags: ["updated_tag:val"], + }, + type: "confluent-cloud-accounts", + }, + }, + accountId: CONFLUENT_ACCOUNT_DATA_ID, +}; + +apiInstance + .updateConfluentAccount(params) + .then((data: v2.ConfluentAccountResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/confluent-cloud/UpdateConfluentResource.ts b/examples/v2/confluent-cloud/UpdateConfluentResource.ts new file mode 100644 index 00000000000..a9bf20cc195 --- /dev/null +++ b/examples/v2/confluent-cloud/UpdateConfluentResource.ts @@ -0,0 +1,32 @@ +/** + * Update resource in Confluent account returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ConfluentCloudApi(configuration); + +const params: v2.ConfluentCloudApiUpdateConfluentResourceRequest = { + body: { + data: { + attributes: { + resourceType: "kafka", + tags: ["myTag", "myTag2:myValue"], + }, + id: "resource-id-123", + type: "confluent-cloud-resources", + }, + }, + accountId: "account_id", + resourceId: "resource_id", +}; + +apiInstance + .updateConfluentResource(params) + .then((data: v2.ConfluentResourceResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/v2/confluent_cloud.feature b/features/v2/confluent_cloud.feature new file mode 100644 index 00000000000..07379df3c97 --- /dev/null +++ b/features/v2/confluent_cloud.feature @@ -0,0 +1,243 @@ +@endpoint(confluent-cloud) @endpoint(confluent-cloud-v2) +Feature: Confluent Cloud + Configure your Datadog Confluent Cloud integration directly through the + Datadog API. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ConfluentCloud" API + + @generated @skip @team:Datadog/web-integrations + Scenario: Add Confluent account returns "Bad Request" response + Given new "CreateConfluentAccount" request + And body with value {"data": {"attributes": {"api_key": "TESTAPIKEY123", "api_secret": "test-api-secret-123", "resources": [{"id": "resource-id-123", "resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}], "tags": ["myTag", "myTag2:myValue"]}, "type": "confluent-cloud-accounts"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/web-integrations + Scenario: Add Confluent account returns "Not Found" response + Given new "CreateConfluentAccount" request + And body with value {"data": {"attributes": {"api_key": "TESTAPIKEY123", "api_secret": "test-api-secret-123", "resources": [{"id": "resource-id-123", "resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}], "tags": ["myTag", "myTag2:myValue"]}, "type": "confluent-cloud-accounts"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:Datadog/web-integrations + Scenario: Add Confluent account returns "OK" response + Given new "CreateConfluentAccount" request + And body with value {"data": {"attributes": {"api_key": "TESTAPIKEY123", "api_secret": "test-api-secret-123", "resources": [{"id": "resource-id-123", "resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}], "tags": ["myTag", "myTag2:myValue"]}, "type": "confluent-cloud-accounts"}} + When the request is sent + Then the response status is 201 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: Add resource to Confluent account returns "Bad Request" response + Given new "CreateConfluentResource" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "resource-id-123", "type": "confluent-cloud-resources"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/web-integrations + Scenario: Add resource to Confluent account returns "Not Found" response + Given new "CreateConfluentResource" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "resource-id-123", "type": "confluent-cloud-resources"}} + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/web-integrations + Scenario: Add resource to Confluent account returns "OK" response + Given there is a valid "confluent_account" in the system + And new "CreateConfluentResource" request + And request contains "account_id" parameter from "confluent_account.data.id" + And body with value {"data": {"attributes": {"resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "{{ unique_lower_alnum }}", "type": "confluent-cloud-resources"}} + When the request is sent + Then the response status is 201 OK + And the response "data.id" is equal to "{{ unique_lower_alnum }}" + And the response "data.attributes.resource_type" is equal to "kafka" + And the response "data.attributes.tags[0]" is equal to "myTag" + + @generated @skip @team:Datadog/web-integrations + Scenario: Delete Confluent account returns "Bad Request" response + Given new "DeleteConfluentAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/web-integrations + Scenario: Delete Confluent account returns "Not Found" response + Given new "DeleteConfluentAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:Datadog/web-integrations + Scenario: Delete Confluent account returns "OK" response + Given new "DeleteConfluentAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: Delete resource from Confluent account returns "Bad Request" response + Given new "DeleteConfluentResource" request + And request contains "account_id" parameter from "REPLACE.ME" + And request contains "resource_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/web-integrations + Scenario: Delete resource from Confluent account returns "Not Found" response + Given new "DeleteConfluentResource" request + And request contains "account_id" parameter from "REPLACE.ME" + And request contains "resource_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/web-integrations + Scenario: Delete resource from Confluent account returns "OK" response + Given there is a valid "confluent_account" in the system + And new "DeleteConfluentAccount" request + And request contains "account_id" parameter from "confluent_account.data.id" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: Get Confluent account returns "Bad Request" response + Given new "GetConfluentAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/web-integrations + Scenario: Get Confluent account returns "Not Found" response + Given new "GetConfluentAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/web-integrations + Scenario: Get Confluent account returns "OK" response + Given there is a valid "confluent_account" in the system + And new "GetConfluentAccount" request + And request contains "account_id" parameter from "confluent_account.data.id" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: Get resource from Confluent account returns "Bad Request" response + Given new "GetConfluentResource" request + And request contains "account_id" parameter from "REPLACE.ME" + And request contains "resource_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/web-integrations + Scenario: Get resource from Confluent account returns "Not Found" response + Given new "GetConfluentResource" request + And request contains "account_id" parameter from "REPLACE.ME" + And request contains "resource_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:Datadog/web-integrations + Scenario: Get resource from Confluent account returns "OK" response + Given new "GetConfluentResource" request + And request contains "account_id" parameter from "REPLACE.ME" + And request contains "resource_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: List Confluent Account resources returns "Bad Request" response + Given new "ListConfluentResource" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/web-integrations + Scenario: List Confluent Account resources returns "Not Found" response + Given new "ListConfluentResource" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:Datadog/web-integrations + Scenario: List Confluent Account resources returns "OK" response + Given new "ListConfluentResource" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: List Confluent accounts returns "Bad Request" response + Given new "ListConfluentAccount" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/web-integrations + Scenario: List Confluent accounts returns "Not Found" response + Given new "ListConfluentAccount" request + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/web-integrations + Scenario: List Confluent accounts returns "OK" response + Given there is a valid "confluent_account" in the system + And new "ListConfluentAccount" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: Update Confluent account returns "Bad Request" response + Given new "UpdateConfluentAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"api_key": "TESTAPIKEY123", "api_secret": "test-api-secret-123", "tags": ["myTag", "myTag2:myValue"]}, "type": "confluent-cloud-accounts"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/web-integrations + Scenario: Update Confluent account returns "Not Found" response + Given new "UpdateConfluentAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"api_key": "TESTAPIKEY123", "api_secret": "test-api-secret-123", "tags": ["myTag", "myTag2:myValue"]}, "type": "confluent-cloud-accounts"}} + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/web-integrations + Scenario: Update Confluent account returns "OK" response + Given there is a valid "confluent_account" in the system + And new "UpdateConfluentAccount" request + And request contains "account_id" parameter from "confluent_account.data.id" + And body with value {"data": {"attributes": {"api_key": "{{confluent_account.data.attributes.api_key}}", "api_secret": "update-secret", "tags": ["updated_tag:val"]}, "type": "confluent-cloud-accounts"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.tags[0]" is equal to "updated_tag:val" + And the response "data.attributes.api_key" is equal to "{{ confluent_account.data.attributes.api_key }}" + + @generated @skip @team:Datadog/web-integrations + Scenario: Update resource in Confluent account returns "Bad Request" response + Given new "UpdateConfluentResource" request + And request contains "account_id" parameter from "REPLACE.ME" + And request contains "resource_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "resource-id-123", "type": "confluent-cloud-resources"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/web-integrations + Scenario: Update resource in Confluent account returns "Not Found" response + Given new "UpdateConfluentResource" request + And request contains "account_id" parameter from "REPLACE.ME" + And request contains "resource_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "resource-id-123", "type": "confluent-cloud-resources"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:Datadog/web-integrations + Scenario: Update resource in Confluent account returns "OK" response + Given new "UpdateConfluentResource" request + And request contains "account_id" parameter from "REPLACE.ME" + And request contains "resource_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "resource-id-123", "type": "confluent-cloud-resources"}} + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/given.json b/features/v2/given.json index 4b4f179d184..05124c081d1 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -107,6 +107,18 @@ "tag": "Opsgenie Integration", "operationId": "CreateOpsgenieService" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"confluent-cloud-accounts\",\n \"attributes\": {\n \"api_key\": \"{{ unique_alnum }}\",\n \"api_secret\": \"test-api-secret\",\n \"tags\": [\n \"tag1\",\n \"tag2:val2\"\n ],\n \"resources\": [\n {\n \"id\": \"test-resource-id\",\n \"resource_type\": \"kafka\",\n \"tags\": [\n \"tag1\",\n \"tag2:val2\"\n ]\n }\n ]\n }\n }\n}" + } + ], + "step": "there is a valid \"confluent_account\" in the system", + "key": "confluent_account", + "tag": "Confluent Cloud", + "operationId": "CreateConfluentAccount" + }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index fef02ce33c9..37892143031 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -268,6 +268,73 @@ "type": "idempotent" } }, + "ListConfluentAccount": { + "tag": "Confluent Cloud", + "undo": { + "type": "safe" + } + }, + "CreateConfluentAccount": { + "tag": "Confluent Cloud", + "undo": { + "operationId": "DeleteConfluentAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteConfluentAccount": { + "tag": "Confluent Cloud", + "undo": { + "type": "safe" + } + }, + "GetConfluentAccount": { + "tag": "Confluent Cloud", + "undo": { + "type": "safe" + } + }, + "UpdateConfluentAccount": { + "tag": "Confluent Cloud", + "undo": { + "type": "safe" + } + }, + "ListConfluentResource": { + "tag": "Confluent Cloud", + "undo": { + "type": "safe" + } + }, + "CreateConfluentResource": { + "tag": "Confluent Cloud", + "undo": { + "type": "safe" + } + }, + "DeleteConfluentResource": { + "tag": "Confluent Cloud", + "undo": { + "type": "safe" + } + }, + "GetConfluentResource": { + "tag": "Confluent Cloud", + "undo": { + "type": "safe" + } + }, + "UpdateConfluentResource": { + "tag": "Confluent Cloud", + "undo": { + "type": "idempotent" + } + }, "SubmitLog": { "tag": "Logs", "undo": { diff --git a/packages/datadog-api-client-v2/apis/ConfluentCloudApi.ts b/packages/datadog-api-client-v2/apis/ConfluentCloudApi.ts new file mode 100644 index 00000000000..42837f8df3a --- /dev/null +++ b/packages/datadog-api-client-v2/apis/ConfluentCloudApi.ts @@ -0,0 +1,1453 @@ +import { + BaseAPIRequestFactory, + RequiredError, +} from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + getServer, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { ConfluentAccountCreateRequest } from "../models/ConfluentAccountCreateRequest"; +import { ConfluentAccountResponse } from "../models/ConfluentAccountResponse"; +import { ConfluentAccountsResponse } from "../models/ConfluentAccountsResponse"; +import { ConfluentAccountUpdateRequest } from "../models/ConfluentAccountUpdateRequest"; +import { ConfluentResourceRequest } from "../models/ConfluentResourceRequest"; +import { ConfluentResourceResponse } from "../models/ConfluentResourceResponse"; +import { ConfluentResourcesResponse } from "../models/ConfluentResourcesResponse"; + +export class ConfluentCloudApiRequestFactory extends BaseAPIRequestFactory { + public async createConfluentAccount( + body: ConfluentAccountCreateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError( + "Required parameter body was null or undefined when calling createConfluentAccount." + ); + } + + // Path Params + const localVarPath = "/api/v2/integrations/confluent-cloud/accounts"; + + // Make Request Context + const requestContext = getServer( + _config, + "v2.ConfluentCloudApi.createConfluentAccount" + ).makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "ConfluentAccountCreateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async createConfluentResource( + accountId: string, + body: ConfluentResourceRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'accountId' is not null or undefined + if (accountId === null || accountId === undefined) { + throw new RequiredError( + "Required parameter accountId was null or undefined when calling createConfluentResource." + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError( + "Required parameter body was null or undefined when calling createConfluentResource." + ); + } + + // Path Params + const localVarPath = + "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources".replace( + "{" + "account_id" + "}", + encodeURIComponent(String(accountId)) + ); + + // Make Request Context + const requestContext = getServer( + _config, + "v2.ConfluentCloudApi.createConfluentResource" + ).makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "ConfluentResourceRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteConfluentAccount( + accountId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'accountId' is not null or undefined + if (accountId === null || accountId === undefined) { + throw new RequiredError( + "Required parameter accountId was null or undefined when calling deleteConfluentAccount." + ); + } + + // Path Params + const localVarPath = + "/api/v2/integrations/confluent-cloud/accounts/{account_id}".replace( + "{" + "account_id" + "}", + encodeURIComponent(String(accountId)) + ); + + // Make Request Context + const requestContext = getServer( + _config, + "v2.ConfluentCloudApi.deleteConfluentAccount" + ).makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteConfluentResource( + accountId: string, + resourceId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'accountId' is not null or undefined + if (accountId === null || accountId === undefined) { + throw new RequiredError( + "Required parameter accountId was null or undefined when calling deleteConfluentResource." + ); + } + + // verify required parameter 'resourceId' is not null or undefined + if (resourceId === null || resourceId === undefined) { + throw new RequiredError( + "Required parameter resourceId was null or undefined when calling deleteConfluentResource." + ); + } + + // Path Params + const localVarPath = + "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}" + .replace( + "{" + "account_id" + "}", + encodeURIComponent(String(accountId)) + ) + .replace( + "{" + "resource_id" + "}", + encodeURIComponent(String(resourceId)) + ); + + // Make Request Context + const requestContext = getServer( + _config, + "v2.ConfluentCloudApi.deleteConfluentResource" + ).makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getConfluentAccount( + accountId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'accountId' is not null or undefined + if (accountId === null || accountId === undefined) { + throw new RequiredError( + "Required parameter accountId was null or undefined when calling getConfluentAccount." + ); + } + + // Path Params + const localVarPath = + "/api/v2/integrations/confluent-cloud/accounts/{account_id}".replace( + "{" + "account_id" + "}", + encodeURIComponent(String(accountId)) + ); + + // Make Request Context + const requestContext = getServer( + _config, + "v2.ConfluentCloudApi.getConfluentAccount" + ).makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getConfluentResource( + accountId: string, + resourceId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'accountId' is not null or undefined + if (accountId === null || accountId === undefined) { + throw new RequiredError( + "Required parameter accountId was null or undefined when calling getConfluentResource." + ); + } + + // verify required parameter 'resourceId' is not null or undefined + if (resourceId === null || resourceId === undefined) { + throw new RequiredError( + "Required parameter resourceId was null or undefined when calling getConfluentResource." + ); + } + + // Path Params + const localVarPath = + "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}" + .replace( + "{" + "account_id" + "}", + encodeURIComponent(String(accountId)) + ) + .replace( + "{" + "resource_id" + "}", + encodeURIComponent(String(resourceId)) + ); + + // Make Request Context + const requestContext = getServer( + _config, + "v2.ConfluentCloudApi.getConfluentResource" + ).makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listConfluentAccount( + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // Path Params + const localVarPath = "/api/v2/integrations/confluent-cloud/accounts"; + + // Make Request Context + const requestContext = getServer( + _config, + "v2.ConfluentCloudApi.listConfluentAccount" + ).makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listConfluentResource( + accountId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'accountId' is not null or undefined + if (accountId === null || accountId === undefined) { + throw new RequiredError( + "Required parameter accountId was null or undefined when calling listConfluentResource." + ); + } + + // Path Params + const localVarPath = + "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources".replace( + "{" + "account_id" + "}", + encodeURIComponent(String(accountId)) + ); + + // Make Request Context + const requestContext = getServer( + _config, + "v2.ConfluentCloudApi.listConfluentResource" + ).makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateConfluentAccount( + accountId: string, + body: ConfluentAccountUpdateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'accountId' is not null or undefined + if (accountId === null || accountId === undefined) { + throw new RequiredError( + "Required parameter accountId was null or undefined when calling updateConfluentAccount." + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError( + "Required parameter body was null or undefined when calling updateConfluentAccount." + ); + } + + // Path Params + const localVarPath = + "/api/v2/integrations/confluent-cloud/accounts/{account_id}".replace( + "{" + "account_id" + "}", + encodeURIComponent(String(accountId)) + ); + + // Make Request Context + const requestContext = getServer( + _config, + "v2.ConfluentCloudApi.updateConfluentAccount" + ).makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "ConfluentAccountUpdateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateConfluentResource( + accountId: string, + resourceId: string, + body: ConfluentResourceRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'accountId' is not null or undefined + if (accountId === null || accountId === undefined) { + throw new RequiredError( + "Required parameter accountId was null or undefined when calling updateConfluentResource." + ); + } + + // verify required parameter 'resourceId' is not null or undefined + if (resourceId === null || resourceId === undefined) { + throw new RequiredError( + "Required parameter resourceId was null or undefined when calling updateConfluentResource." + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError( + "Required parameter body was null or undefined when calling updateConfluentResource." + ); + } + + // Path Params + const localVarPath = + "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}" + .replace( + "{" + "account_id" + "}", + encodeURIComponent(String(accountId)) + ) + .replace( + "{" + "resource_id" + "}", + encodeURIComponent(String(resourceId)) + ); + + // Make Request Context + const requestContext = getServer( + _config, + "v2.ConfluentCloudApi.updateConfluentResource" + ).makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "ConfluentResourceRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class ConfluentCloudApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConfluentAccount + * @throws ApiException if the response code was not in [200, 299] + */ + public async createConfluentAccount( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 201) { + const body: ConfluentAccountResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentAccountResponse" + ) as ConfluentAccountResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.info(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ConfluentAccountResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentAccountResponse", + "" + ) as ConfluentAccountResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConfluentResource + * @throws ApiException if the response code was not in [200, 299] + */ + public async createConfluentResource( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 201) { + const body: ConfluentResourceResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentResourceResponse" + ) as ConfluentResourceResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.info(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ConfluentResourceResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentResourceResponse", + "" + ) as ConfluentResourceResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConfluentAccount + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteConfluentAccount( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 204) { + return; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.info(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", + "" + ) as void; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConfluentResource + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteConfluentResource( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 204) { + return; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.info(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", + "" + ) as void; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getConfluentAccount + * @throws ApiException if the response code was not in [200, 299] + */ + public async getConfluentAccount( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: ConfluentAccountResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentAccountResponse" + ) as ConfluentAccountResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.info(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ConfluentAccountResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentAccountResponse", + "" + ) as ConfluentAccountResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getConfluentResource + * @throws ApiException if the response code was not in [200, 299] + */ + public async getConfluentResource( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: ConfluentResourceResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentResourceResponse" + ) as ConfluentResourceResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.info(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ConfluentResourceResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentResourceResponse", + "" + ) as ConfluentResourceResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listConfluentAccount + * @throws ApiException if the response code was not in [200, 299] + */ + public async listConfluentAccount( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: ConfluentAccountsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentAccountsResponse" + ) as ConfluentAccountsResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.info(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ConfluentAccountsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentAccountsResponse", + "" + ) as ConfluentAccountsResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listConfluentResource + * @throws ApiException if the response code was not in [200, 299] + */ + public async listConfluentResource( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: ConfluentResourcesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentResourcesResponse" + ) as ConfluentResourcesResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.info(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ConfluentResourcesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentResourcesResponse", + "" + ) as ConfluentResourcesResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConfluentAccount + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateConfluentAccount( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: ConfluentAccountResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentAccountResponse" + ) as ConfluentAccountResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.info(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ConfluentAccountResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentAccountResponse", + "" + ) as ConfluentAccountResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConfluentResource + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateConfluentResource( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: ConfluentResourceResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentResourceResponse" + ) as ConfluentResourceResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.info(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ConfluentResourceResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentResourceResponse", + "" + ) as ConfluentResourceResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface ConfluentCloudApiCreateConfluentAccountRequest { + /** + * Confluent payload + * @type ConfluentAccountCreateRequest + */ + body: ConfluentAccountCreateRequest; +} + +export interface ConfluentCloudApiCreateConfluentResourceRequest { + /** + * Confluent Account id. + * @type string + */ + accountId: string; + /** + * Confluent payload + * @type ConfluentResourceRequest + */ + body: ConfluentResourceRequest; +} + +export interface ConfluentCloudApiDeleteConfluentAccountRequest { + /** + * Confluent Account id. + * @type string + */ + accountId: string; +} + +export interface ConfluentCloudApiDeleteConfluentResourceRequest { + /** + * Confluent Account id. + * @type string + */ + accountId: string; + /** + * Confluent Account Resource ID. + * @type string + */ + resourceId: string; +} + +export interface ConfluentCloudApiGetConfluentAccountRequest { + /** + * Confluent Account id. + * @type string + */ + accountId: string; +} + +export interface ConfluentCloudApiGetConfluentResourceRequest { + /** + * Confluent Account id. + * @type string + */ + accountId: string; + /** + * Confluent Account Resource ID. + * @type string + */ + resourceId: string; +} + +export interface ConfluentCloudApiListConfluentResourceRequest { + /** + * Confluent Account id. + * @type string + */ + accountId: string; +} + +export interface ConfluentCloudApiUpdateConfluentAccountRequest { + /** + * Confluent Account id. + * @type string + */ + accountId: string; + /** + * Confluent payload + * @type ConfluentAccountUpdateRequest + */ + body: ConfluentAccountUpdateRequest; +} + +export interface ConfluentCloudApiUpdateConfluentResourceRequest { + /** + * Confluent Account id. + * @type string + */ + accountId: string; + /** + * Confluent Account Resource ID. + * @type string + */ + resourceId: string; + /** + * Confluent payload + * @type ConfluentResourceRequest + */ + body: ConfluentResourceRequest; +} + +export class ConfluentCloudApi { + private requestFactory: ConfluentCloudApiRequestFactory; + private responseProcessor: ConfluentCloudApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: ConfluentCloudApiRequestFactory, + responseProcessor?: ConfluentCloudApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || new ConfluentCloudApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new ConfluentCloudApiResponseProcessor(); + } + + /** + * Create a Confluent account. + * @param param The request object + */ + public createConfluentAccount( + param: ConfluentCloudApiCreateConfluentAccountRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createConfluentAccount( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createConfluentAccount(responseContext); + }); + }); + } + + /** + * Create a Confluent resource for the account associated with the provided ID. + * @param param The request object + */ + public createConfluentResource( + param: ConfluentCloudApiCreateConfluentResourceRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createConfluentResource( + param.accountId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createConfluentResource( + responseContext + ); + }); + }); + } + + /** + * Delete a Confluent account with the provided account ID. + * @param param The request object + */ + public deleteConfluentAccount( + param: ConfluentCloudApiDeleteConfluentAccountRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deleteConfluentAccount( + param.accountId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteConfluentAccount(responseContext); + }); + }); + } + + /** + * Delete a Confluent resource with the provided resource id for the account associated with the provided account ID. + * @param param The request object + */ + public deleteConfluentResource( + param: ConfluentCloudApiDeleteConfluentResourceRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deleteConfluentResource( + param.accountId, + param.resourceId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteConfluentResource( + responseContext + ); + }); + }); + } + + /** + * Get the Confluent account with the provided account ID. + * @param param The request object + */ + public getConfluentAccount( + param: ConfluentCloudApiGetConfluentAccountRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getConfluentAccount( + param.accountId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getConfluentAccount(responseContext); + }); + }); + } + + /** + * Get a Confluent resource with the provided resource id for the account associated with the provided account ID. + * @param param The request object + */ + public getConfluentResource( + param: ConfluentCloudApiGetConfluentResourceRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getConfluentResource( + param.accountId, + param.resourceId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getConfluentResource(responseContext); + }); + }); + } + + /** + * List Confluent accounts. + * @param param The request object + */ + public listConfluentAccount( + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.listConfluentAccount(options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listConfluentAccount(responseContext); + }); + }); + } + + /** + * Get a Confluent resource for the account associated with the provided ID. + * @param param The request object + */ + public listConfluentResource( + param: ConfluentCloudApiListConfluentResourceRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.listConfluentResource( + param.accountId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listConfluentResource(responseContext); + }); + }); + } + + /** + * Update the Confluent account with the provided account ID. + * @param param The request object + */ + public updateConfluentAccount( + param: ConfluentCloudApiUpdateConfluentAccountRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.updateConfluentAccount( + param.accountId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateConfluentAccount(responseContext); + }); + }); + } + + /** + * Update a Confluent resource with the provided resource id for the account associated with the provided account ID. + * @param param The request object + */ + public updateConfluentResource( + param: ConfluentCloudApiUpdateConfluentResourceRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.updateConfluentResource( + param.accountId, + param.resourceId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateConfluentResource( + responseContext + ); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 4c54ca050af..e1b6a8aff57 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -21,6 +21,19 @@ export { CloudWorkloadSecurityApi, } from "./apis/CloudWorkloadSecurityApi"; +export { + ConfluentCloudApiCreateConfluentAccountRequest, + ConfluentCloudApiCreateConfluentResourceRequest, + ConfluentCloudApiDeleteConfluentAccountRequest, + ConfluentCloudApiDeleteConfluentResourceRequest, + ConfluentCloudApiGetConfluentAccountRequest, + ConfluentCloudApiGetConfluentResourceRequest, + ConfluentCloudApiListConfluentResourceRequest, + ConfluentCloudApiUpdateConfluentAccountRequest, + ConfluentCloudApiUpdateConfluentResourceRequest, + ConfluentCloudApi, +} from "./apis/ConfluentCloudApi"; + export { DashboardListsApiCreateDashboardListItemsRequest, DashboardListsApiDeleteDashboardListItemsRequest, @@ -299,6 +312,26 @@ export { CloudWorkloadSecurityAgentRuleUpdateAttributes } from "./models/CloudWo export { CloudWorkloadSecurityAgentRuleUpdateData } from "./models/CloudWorkloadSecurityAgentRuleUpdateData"; export { CloudWorkloadSecurityAgentRuleUpdaterAttributes } from "./models/CloudWorkloadSecurityAgentRuleUpdaterAttributes"; export { CloudWorkloadSecurityAgentRuleUpdateRequest } from "./models/CloudWorkloadSecurityAgentRuleUpdateRequest"; +export { ConfluentAccountCreateRequest } from "./models/ConfluentAccountCreateRequest"; +export { ConfluentAccountCreateRequestAttributes } from "./models/ConfluentAccountCreateRequestAttributes"; +export { ConfluentAccountCreateRequestData } from "./models/ConfluentAccountCreateRequestData"; +export { ConfluentAccountResourceAttributes } from "./models/ConfluentAccountResourceAttributes"; +export { ConfluentAccountResponse } from "./models/ConfluentAccountResponse"; +export { ConfluentAccountResponseAttributes } from "./models/ConfluentAccountResponseAttributes"; +export { ConfluentAccountResponseData } from "./models/ConfluentAccountResponseData"; +export { ConfluentAccountsResponse } from "./models/ConfluentAccountsResponse"; +export { ConfluentAccountType } from "./models/ConfluentAccountType"; +export { ConfluentAccountUpdateRequest } from "./models/ConfluentAccountUpdateRequest"; +export { ConfluentAccountUpdateRequestAttributes } from "./models/ConfluentAccountUpdateRequestAttributes"; +export { ConfluentAccountUpdateRequestData } from "./models/ConfluentAccountUpdateRequestData"; +export { ConfluentResourceRequest } from "./models/ConfluentResourceRequest"; +export { ConfluentResourceRequestAttributes } from "./models/ConfluentResourceRequestAttributes"; +export { ConfluentResourceRequestData } from "./models/ConfluentResourceRequestData"; +export { ConfluentResourceResponse } from "./models/ConfluentResourceResponse"; +export { ConfluentResourceResponseAttributes } from "./models/ConfluentResourceResponseAttributes"; +export { ConfluentResourceResponseData } from "./models/ConfluentResourceResponseData"; +export { ConfluentResourcesResponse } from "./models/ConfluentResourcesResponse"; +export { ConfluentResourceType } from "./models/ConfluentResourceType"; export { ContentEncoding } from "./models/ContentEncoding"; export { CostByOrg } from "./models/CostByOrg"; export { CostByOrgAttributes } from "./models/CostByOrgAttributes"; diff --git a/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequest.ts b/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequest.ts new file mode 100644 index 00000000000..97e033405b3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequest.ts @@ -0,0 +1,43 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ConfluentAccountCreateRequestData } from "./ConfluentAccountCreateRequestData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Payload schema when adding a Confluent account. + */ +export class ConfluentAccountCreateRequest { + /** + * The data body for adding a Confluent account. + */ + "data": ConfluentAccountCreateRequestData; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ConfluentAccountCreateRequestData", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentAccountCreateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequestAttributes.ts b/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequestAttributes.ts new file mode 100644 index 00000000000..d16b850be81 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequestAttributes.ts @@ -0,0 +1,68 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ConfluentAccountResourceAttributes } from "./ConfluentAccountResourceAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes associated with the account creation request. + */ +export class ConfluentAccountCreateRequestAttributes { + /** + * The API key associated with your Confluent account. + */ + "apiKey": string; + /** + * The API secret associated with your Confluent account. + */ + "apiSecret": string; + /** + * A list of Confluent resources associated with the Confluent account. + */ + "resources"?: Array; + /** + * A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon. + */ + "tags"?: Array; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + apiKey: { + baseName: "api_key", + type: "string", + required: true, + }, + apiSecret: { + baseName: "api_secret", + type: "string", + required: true, + }, + resources: { + baseName: "resources", + type: "Array", + }, + tags: { + baseName: "tags", + type: "Array", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentAccountCreateRequestAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequestData.ts b/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequestData.ts new file mode 100644 index 00000000000..5f42faea5b3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequestData.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ConfluentAccountCreateRequestAttributes } from "./ConfluentAccountCreateRequestAttributes"; +import { ConfluentAccountType } from "./ConfluentAccountType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The data body for adding a Confluent account. + */ +export class ConfluentAccountCreateRequestData { + /** + * Attributes associated with the account creation request. + */ + "attributes": ConfluentAccountCreateRequestAttributes; + /** + * The JSON:API type for this API. Should always be `confluent-cloud-accounts`. + */ + "type": ConfluentAccountType; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "ConfluentAccountCreateRequestAttributes", + required: true, + }, + type: { + baseName: "type", + type: "ConfluentAccountType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentAccountCreateRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentAccountResourceAttributes.ts b/packages/datadog-api-client-v2/models/ConfluentAccountResourceAttributes.ts new file mode 100644 index 00000000000..94b8597691f --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentAccountResourceAttributes.ts @@ -0,0 +1,57 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes object for updating a Confluent resource. + */ +export class ConfluentAccountResourceAttributes { + /** + * The ID associated with a Confluent resource. + */ + "id"?: string; + /** + * The resource type of the Resource. Can be `kafka`, `connector`, `ksql`, or `schema_registry`. + */ + "resourceType"?: string; + /** + * A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon. + */ + "tags"?: Array; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + }, + resourceType: { + baseName: "resource_type", + type: "string", + }, + tags: { + baseName: "tags", + type: "Array", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentAccountResourceAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentAccountResponse.ts b/packages/datadog-api-client-v2/models/ConfluentAccountResponse.ts new file mode 100644 index 00000000000..8d158d0bee0 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentAccountResponse.ts @@ -0,0 +1,42 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ConfluentAccountResponseData } from "./ConfluentAccountResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The expected response schema when getting a Confluent account. + */ +export class ConfluentAccountResponse { + /** + * An API key and API secret pair that represents a Confluent account. + */ + "data"?: ConfluentAccountResponseData; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ConfluentAccountResponseData", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentAccountResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentAccountResponseAttributes.ts b/packages/datadog-api-client-v2/models/ConfluentAccountResponseAttributes.ts new file mode 100644 index 00000000000..89c70261c0c --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentAccountResponseAttributes.ts @@ -0,0 +1,59 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ConfluentResourceResponseAttributes } from "./ConfluentResourceResponseAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The attributes of a Confluent account. + */ +export class ConfluentAccountResponseAttributes { + /** + * The API key associated with your Confluent account. + */ + "apiKey": string; + /** + * A list of Confluent resources associated with the Confluent account. + */ + "resources"?: Array; + /** + * A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon. + */ + "tags"?: Array; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + apiKey: { + baseName: "api_key", + type: "string", + required: true, + }, + resources: { + baseName: "resources", + type: "Array", + }, + tags: { + baseName: "tags", + type: "Array", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentAccountResponseAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentAccountResponseData.ts b/packages/datadog-api-client-v2/models/ConfluentAccountResponseData.ts new file mode 100644 index 00000000000..7dae3d1d045 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentAccountResponseData.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ConfluentAccountResponseAttributes } from "./ConfluentAccountResponseAttributes"; +import { ConfluentAccountType } from "./ConfluentAccountType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * An API key and API secret pair that represents a Confluent account. + */ +export class ConfluentAccountResponseData { + /** + * The attributes of a Confluent account. + */ + "attributes": ConfluentAccountResponseAttributes; + /** + * A randomly generated ID associated with a Confluent account. + */ + "id": string; + /** + * The JSON:API type for this API. Should always be `confluent-cloud-accounts`. + */ + "type": ConfluentAccountType; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "ConfluentAccountResponseAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "ConfluentAccountType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentAccountResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentAccountType.ts b/packages/datadog-api-client-v2/models/ConfluentAccountType.ts new file mode 100644 index 00000000000..ade00bedfdf --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentAccountType.ts @@ -0,0 +1,8 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +export type ConfluentAccountType = typeof CONFLUENT_CLOUD_ACCOUNTS; +export const CONFLUENT_CLOUD_ACCOUNTS = "confluent-cloud-accounts"; diff --git a/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequest.ts b/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequest.ts new file mode 100644 index 00000000000..6c4f4dde204 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequest.ts @@ -0,0 +1,43 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ConfluentAccountUpdateRequestData } from "./ConfluentAccountUpdateRequestData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The JSON:API request for updating a Confluent account. + */ +export class ConfluentAccountUpdateRequest { + /** + * Data object for updating a Confluent account. + */ + "data": ConfluentAccountUpdateRequestData; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ConfluentAccountUpdateRequestData", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentAccountUpdateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequestAttributes.ts b/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequestAttributes.ts new file mode 100644 index 00000000000..c7252faa171 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequestAttributes.ts @@ -0,0 +1,59 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes object for updating a Confluent account. + */ +export class ConfluentAccountUpdateRequestAttributes { + /** + * The API key associated with your Confluent account. + */ + "apiKey": string; + /** + * The API secret associated with your Confluent account. + */ + "apiSecret": string; + /** + * A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon. + */ + "tags"?: Array; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + apiKey: { + baseName: "api_key", + type: "string", + required: true, + }, + apiSecret: { + baseName: "api_secret", + type: "string", + required: true, + }, + tags: { + baseName: "tags", + type: "Array", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentAccountUpdateRequestAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequestData.ts b/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequestData.ts new file mode 100644 index 00000000000..81e7991b914 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequestData.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ConfluentAccountType } from "./ConfluentAccountType"; +import { ConfluentAccountUpdateRequestAttributes } from "./ConfluentAccountUpdateRequestAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Data object for updating a Confluent account. + */ +export class ConfluentAccountUpdateRequestData { + /** + * Attributes object for updating a Confluent account. + */ + "attributes": ConfluentAccountUpdateRequestAttributes; + /** + * The JSON:API type for this API. Should always be `confluent-cloud-accounts`. + */ + "type": ConfluentAccountType; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "ConfluentAccountUpdateRequestAttributes", + required: true, + }, + type: { + baseName: "type", + type: "ConfluentAccountType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentAccountUpdateRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentAccountsResponse.ts b/packages/datadog-api-client-v2/models/ConfluentAccountsResponse.ts new file mode 100644 index 00000000000..a4e50bdb4d8 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentAccountsResponse.ts @@ -0,0 +1,42 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ConfluentAccountResponseData } from "./ConfluentAccountResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Confluent account returned by the API. + */ +export class ConfluentAccountsResponse { + /** + * The Confluent account. + */ + "data"?: Array; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentAccountsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentResourceRequest.ts b/packages/datadog-api-client-v2/models/ConfluentResourceRequest.ts new file mode 100644 index 00000000000..dafa34a2121 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentResourceRequest.ts @@ -0,0 +1,43 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ConfluentResourceRequestData } from "./ConfluentResourceRequestData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The JSON:API request for updating a Confluent resource. + */ +export class ConfluentResourceRequest { + /** + * JSON:API request for updating a Confluent resource. + */ + "data": ConfluentResourceRequestData; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ConfluentResourceRequestData", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentResourceRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentResourceRequestAttributes.ts b/packages/datadog-api-client-v2/models/ConfluentResourceRequestAttributes.ts new file mode 100644 index 00000000000..dfdd2bf4e3a --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentResourceRequestAttributes.ts @@ -0,0 +1,49 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes object for updating a Confluent resource. + */ +export class ConfluentResourceRequestAttributes { + /** + * The resource type of the Resource. Can be `kafka`, `connector`, `ksql`, or `schema_registry`. + */ + "resourceType"?: string; + /** + * A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon. + */ + "tags"?: Array; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + resourceType: { + baseName: "resource_type", + type: "string", + }, + tags: { + baseName: "tags", + type: "Array", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentResourceRequestAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentResourceRequestData.ts b/packages/datadog-api-client-v2/models/ConfluentResourceRequestData.ts new file mode 100644 index 00000000000..af77160e564 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentResourceRequestData.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ConfluentResourceRequestAttributes } from "./ConfluentResourceRequestAttributes"; +import { ConfluentResourceType } from "./ConfluentResourceType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * JSON:API request for updating a Confluent resource. + */ +export class ConfluentResourceRequestData { + /** + * Attributes object for updating a Confluent resource. + */ + "attributes": ConfluentResourceRequestAttributes; + /** + * The ID associated with a Confluent resource. + */ + "id": string; + /** + * The JSON:API type for this request. + */ + "type": ConfluentResourceType; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "ConfluentResourceRequestAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "ConfluentResourceType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentResourceRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentResourceResponse.ts b/packages/datadog-api-client-v2/models/ConfluentResourceResponse.ts new file mode 100644 index 00000000000..44070968059 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentResourceResponse.ts @@ -0,0 +1,42 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ConfluentResourceResponseData } from "./ConfluentResourceResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response schema when interacting with a Confluent resource. + */ +export class ConfluentResourceResponse { + /** + * Confluent Cloud resource data. + */ + "data"?: ConfluentResourceResponseData; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ConfluentResourceResponseData", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentResourceResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentResourceResponseAttributes.ts b/packages/datadog-api-client-v2/models/ConfluentResourceResponseAttributes.ts new file mode 100644 index 00000000000..0e930767c89 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentResourceResponseAttributes.ts @@ -0,0 +1,50 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Model representation of a Confluent Cloud resource. + */ +export class ConfluentResourceResponseAttributes { + /** + * The resource type of the Resource. Can be `kafka`, `connector`, `ksql`, or `schema_registry`. + */ + "resourceType": string; + /** + * A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon. + */ + "tags"?: Array; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + resourceType: { + baseName: "resource_type", + type: "string", + required: true, + }, + tags: { + baseName: "tags", + type: "Array", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentResourceResponseAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentResourceResponseData.ts b/packages/datadog-api-client-v2/models/ConfluentResourceResponseData.ts new file mode 100644 index 00000000000..3138a9f62a4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentResourceResponseData.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ConfluentResourceResponseAttributes } from "./ConfluentResourceResponseAttributes"; +import { ConfluentResourceType } from "./ConfluentResourceType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Confluent Cloud resource data. + */ +export class ConfluentResourceResponseData { + /** + * Model representation of a Confluent Cloud resource. + */ + "attributes": ConfluentResourceResponseAttributes; + /** + * The ID associated with the Confluent resource. + */ + "id": string; + /** + * The JSON:API type for this request. + */ + "type": ConfluentResourceType; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "ConfluentResourceResponseAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "ConfluentResourceType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentResourceResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentResourceType.ts b/packages/datadog-api-client-v2/models/ConfluentResourceType.ts new file mode 100644 index 00000000000..f745d0cdd2e --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentResourceType.ts @@ -0,0 +1,8 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +export type ConfluentResourceType = typeof CONFLUENT_CLOUD_RESOURCES; +export const CONFLUENT_CLOUD_RESOURCES = "confluent-cloud-resources"; diff --git a/packages/datadog-api-client-v2/models/ConfluentResourcesResponse.ts b/packages/datadog-api-client-v2/models/ConfluentResourcesResponse.ts new file mode 100644 index 00000000000..d5f99e9c271 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentResourcesResponse.ts @@ -0,0 +1,42 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ConfluentResourceResponseData } from "./ConfluentResourceResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response schema when interacting with a list of Confluent resources. + */ +export class ConfluentResourcesResponse { + /** + * The JSON:API data attribute. + */ + "data"?: Array; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentResourcesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index c546ee2bb52..fcfdf84acde 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -53,6 +53,24 @@ import { CloudWorkloadSecurityAgentRuleUpdateData } from "./CloudWorkloadSecurit import { CloudWorkloadSecurityAgentRuleUpdateRequest } from "./CloudWorkloadSecurityAgentRuleUpdateRequest"; import { CloudWorkloadSecurityAgentRuleUpdaterAttributes } from "./CloudWorkloadSecurityAgentRuleUpdaterAttributes"; import { CloudWorkloadSecurityAgentRulesListResponse } from "./CloudWorkloadSecurityAgentRulesListResponse"; +import { ConfluentAccountCreateRequest } from "./ConfluentAccountCreateRequest"; +import { ConfluentAccountCreateRequestAttributes } from "./ConfluentAccountCreateRequestAttributes"; +import { ConfluentAccountCreateRequestData } from "./ConfluentAccountCreateRequestData"; +import { ConfluentAccountResourceAttributes } from "./ConfluentAccountResourceAttributes"; +import { ConfluentAccountResponse } from "./ConfluentAccountResponse"; +import { ConfluentAccountResponseAttributes } from "./ConfluentAccountResponseAttributes"; +import { ConfluentAccountResponseData } from "./ConfluentAccountResponseData"; +import { ConfluentAccountUpdateRequest } from "./ConfluentAccountUpdateRequest"; +import { ConfluentAccountUpdateRequestAttributes } from "./ConfluentAccountUpdateRequestAttributes"; +import { ConfluentAccountUpdateRequestData } from "./ConfluentAccountUpdateRequestData"; +import { ConfluentAccountsResponse } from "./ConfluentAccountsResponse"; +import { ConfluentResourceRequest } from "./ConfluentResourceRequest"; +import { ConfluentResourceRequestAttributes } from "./ConfluentResourceRequestAttributes"; +import { ConfluentResourceRequestData } from "./ConfluentResourceRequestData"; +import { ConfluentResourceResponse } from "./ConfluentResourceResponse"; +import { ConfluentResourceResponseAttributes } from "./ConfluentResourceResponseAttributes"; +import { ConfluentResourceResponseData } from "./ConfluentResourceResponseData"; +import { ConfluentResourcesResponse } from "./ConfluentResourcesResponse"; import { CostByOrg } from "./CostByOrg"; import { CostByOrgAttributes } from "./CostByOrgAttributes"; import { CostByOrgResponse } from "./CostByOrgResponse"; @@ -504,6 +522,8 @@ const enumsMap: { [key: string]: any[] } = { ], AuthNMappingsType: ["authn_mappings"], CloudWorkloadSecurityAgentRuleType: ["agent_rule"], + ConfluentAccountType: ["confluent-cloud-accounts"], + ConfluentResourceType: ["confluent-cloud-resources"], ContentEncoding: ["identity", "gzip", "deflate"], CostByOrgType: ["cost_by_org"], DashboardType: [ @@ -783,6 +803,26 @@ const typeMap: { [index: string]: any } = { CloudWorkloadSecurityAgentRuleUpdaterAttributes, CloudWorkloadSecurityAgentRulesListResponse: CloudWorkloadSecurityAgentRulesListResponse, + ConfluentAccountCreateRequest: ConfluentAccountCreateRequest, + ConfluentAccountCreateRequestAttributes: + ConfluentAccountCreateRequestAttributes, + ConfluentAccountCreateRequestData: ConfluentAccountCreateRequestData, + ConfluentAccountResourceAttributes: ConfluentAccountResourceAttributes, + ConfluentAccountResponse: ConfluentAccountResponse, + ConfluentAccountResponseAttributes: ConfluentAccountResponseAttributes, + ConfluentAccountResponseData: ConfluentAccountResponseData, + ConfluentAccountUpdateRequest: ConfluentAccountUpdateRequest, + ConfluentAccountUpdateRequestAttributes: + ConfluentAccountUpdateRequestAttributes, + ConfluentAccountUpdateRequestData: ConfluentAccountUpdateRequestData, + ConfluentAccountsResponse: ConfluentAccountsResponse, + ConfluentResourceRequest: ConfluentResourceRequest, + ConfluentResourceRequestAttributes: ConfluentResourceRequestAttributes, + ConfluentResourceRequestData: ConfluentResourceRequestData, + ConfluentResourceResponse: ConfluentResourceResponse, + ConfluentResourceResponseAttributes: ConfluentResourceResponseAttributes, + ConfluentResourceResponseData: ConfluentResourceResponseData, + ConfluentResourcesResponse: ConfluentResourcesResponse, CostByOrg: CostByOrg, CostByOrgAttributes: CostByOrgAttributes, CostByOrgResponse: CostByOrgResponse,