From 75fdd54581227bcd4130bc60e31da68c351ebf0a Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 30 Aug 2022 14:11:48 +0000 Subject: [PATCH] Regenerate client from commit 443801a5 of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 925 ++++++++++ .../ConfluentCloudPublic1.ts | 17 + .../ConfluentCloudPublic10.ts | 22 + .../ConfluentCloudPublic2.ts | 21 + .../ConfluentCloudPublic3.ts | 37 + .../ConfluentCloudPublic4.ts | 31 + .../ConfluentCloudPublic5.ts | 21 + .../ConfluentCloudPublic6.ts | 21 + .../ConfluentCloudPublic7.ts | 22 + .../ConfluentCloudPublic8.ts | 28 + .../ConfluentCloudPublic9.ts | 32 + .../v2/confluent_cloud_accounts_api.feature | 159 ++ features/v2/undo.json | 60 + .../apis/ConfluentCloudAccountsAPIApi.ts | 1523 +++++++++++++++++ packages/datadog-api-client-v2/index.ts | 34 + .../models/AccountConfig.ts | 62 + .../models/AccountConfigAttributes.ts | 68 + .../models/AccountConfigResponse.ts | 42 + .../models/AccountConfigType.ts | 8 + .../models/AccountConfigsResponse.ts | 42 + .../models/AddAccount.ts | 53 + .../models/AddAccountAttributes.ts | 68 + .../models/AddAccountRequest.ts | 43 + .../models/AddAccountType.ts | 8 + .../models/ConfluentCloudResource.ts | 59 + .../models/ConfluentCloudResourceRequest.ts | 43 + .../models/ConfluentCloudResourceResponse.ts | 42 + .../models/ConfluentCloudResourcesResponse.ts | 42 + .../models/ObjectSerializer.ts | 38 + .../models/UpdateAccount.ts | 53 + .../models/UpdateAccountAttributes.ts | 59 + .../models/UpdateAccountRequest.ts | 43 + .../models/UpdateAccountType.ts | 8 + .../models/UpdateResource.ts | 61 + .../models/UpdateResourceAttributes.ts | 49 + .../models/UpdateResourceRequest.ts | 43 + .../models/UpdateResourceType.ts | 8 + 38 files changed, 3899 insertions(+), 4 deletions(-) create mode 100644 examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic1.ts create mode 100644 examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic10.ts create mode 100644 examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic2.ts create mode 100644 examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic3.ts create mode 100644 examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic4.ts create mode 100644 examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic5.ts create mode 100644 examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic6.ts create mode 100644 examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic7.ts create mode 100644 examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic8.ts create mode 100644 examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic9.ts create mode 100644 features/v2/confluent_cloud_accounts_api.feature create mode 100644 packages/datadog-api-client-v2/apis/ConfluentCloudAccountsAPIApi.ts create mode 100644 packages/datadog-api-client-v2/models/AccountConfig.ts create mode 100644 packages/datadog-api-client-v2/models/AccountConfigAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/AccountConfigResponse.ts create mode 100644 packages/datadog-api-client-v2/models/AccountConfigType.ts create mode 100644 packages/datadog-api-client-v2/models/AccountConfigsResponse.ts create mode 100644 packages/datadog-api-client-v2/models/AddAccount.ts create mode 100644 packages/datadog-api-client-v2/models/AddAccountAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/AddAccountRequest.ts create mode 100644 packages/datadog-api-client-v2/models/AddAccountType.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentCloudResource.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentCloudResourceRequest.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentCloudResourceResponse.ts create mode 100644 packages/datadog-api-client-v2/models/ConfluentCloudResourcesResponse.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateAccount.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateAccountAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateAccountRequest.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateAccountType.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateResource.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateResourceAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateResourceRequest.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateResourceType.ts diff --git a/.apigentools-info b/.apigentools-info index 8014ac2e2d82..0048b50d76b2 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2022-08-30 12:29:13.648764", - "spec_repo_commit": "47f45603" + "regenerated": "2022-08-30 14:10:16.742131", + "spec_repo_commit": "443801a5" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2022-08-30 12:29:13.664632", - "spec_repo_commit": "47f45603" + "regenerated": "2022-08-30 14:10:16.760345", + "spec_repo_commit": "443801a5" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index a80513594802..9f9e50406dbc 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -501,6 +501,135 @@ components: type: string x-enum-varnames: - API_KEYS + AccountConfig: + description: An API key and API secret pair that represents a Confluent account. + properties: + attributes: + $ref: '#/components/schemas/AccountConfigAttributes' + id: + description: A randomly generated ID associated with a Confluent account. + example: account_id_abc123 + type: string + type: + $ref: '#/components/schemas/AccountConfigType' + required: + - attributes + - id + - type + type: object + AccountConfigAttributes: + description: The attributes of 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 + writeOnly: true + resources: + description: A list of Confluent resources associated with the Confluent + account. + items: + $ref: '#/components/schemas/ConfluentCloudResource' + type: array + tags: + description: A comma-delimited string representation of 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 + AccountConfigResponse: + description: The expected response schema when getting a Confluent account. + properties: + data: + $ref: '#/components/schemas/AccountConfig' + type: object + AccountConfigType: + 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 + AccountConfigsResponse: + description: Confluent account returned by the API. + properties: + data: + description: The Confluent account. + items: + $ref: '#/components/schemas/AccountConfig' + type: array + type: object + AddAccount: + description: The data body for adding a Confluent account. + properties: + attributes: + $ref: '#/components/schemas/AddAccountAttributes' + type: + $ref: '#/components/schemas/AddAccountType' + required: + - attributes + - type + type: object + AddAccountAttributes: + 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/ConfluentCloudResource' + type: array + tags: + description: A comma-delimited string representation of 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 + AddAccountRequest: + description: Payload schema when adding a Confluent account. + properties: + data: + $ref: '#/components/schemas/AddAccount' + required: + - data + type: object + AddAccountType: + default: confluent-cloud-accounts + description: The JSON:API type. Will always be `confluent-cloud-accounts`. + enum: + - confluent-cloud-accounts + example: confluent-cloud-accounts + type: string + x-enum-varnames: + - CONFLUENT_CLOUD_ACCOUNTS ApplicationKeyCreateAttributes: description: Attributes used to create an application Key. properties: @@ -1267,6 +1396,54 @@ components: $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleData' type: array type: object + ConfluentCloudResource: + description: Model representation of a Confluent Cloud resource. + properties: + id: + description: The ID associated with the Confluent resource. + example: resource_id_abc123 + 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 comma-delimited string representation of tags. Can be a single + key, or key-value pairs separated by a colon. + example: + - myTag + - myTag2:myValue + items: + type: string + type: array + required: + - id + - resource_type + type: object + ConfluentCloudResourceRequest: + description: Payload schema when interacting with a Confluent resource. + properties: + data: + $ref: '#/components/schemas/ConfluentCloudResource' + required: + - data + type: object + ConfluentCloudResourceResponse: + description: Response schema when interacting with a Confluent resource. + properties: + data: + $ref: '#/components/schemas/ConfluentCloudResource' + type: object + ConfluentCloudResourcesResponse: + description: Response schema when interacting with a list of Confluent resources. + properties: + data: + description: The JSON:API data attribute. + items: + $ref: '#/components/schemas/ConfluentCloudResource' + type: array + type: object ContentEncoding: description: HTTP header used to compress the media-type. enum: @@ -7856,6 +8033,108 @@ components: required: - data type: object + UpdateAccount: + description: Data object for updating a Confluent account. + properties: + attributes: + $ref: '#/components/schemas/UpdateAccountAttributes' + type: + $ref: '#/components/schemas/UpdateAccountType' + required: + - attributes + - type + type: object + UpdateAccountAttributes: + 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 comma-delimited string representation of 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 + UpdateAccountRequest: + description: The JSON:API request for updating a Confluent account. + properties: + data: + $ref: '#/components/schemas/UpdateAccount' + required: + - data + type: object + UpdateAccountType: + default: confluent-cloud-accounts + description: The JSON:API type for this request. + enum: + - confluent-cloud-accounts + example: confluent-cloud-accounts + type: string + x-enum-varnames: + - CONFLUENT_CLOUD_ACCOUNTS + UpdateResource: + description: JSON:API request for updating a Confluent resource. + properties: + attributes: + $ref: '#/components/schemas/UpdateResourceAttributes' + id: + description: The ID associated with a Confluent resource. + example: resource-id-123 + type: string + type: + $ref: '#/components/schemas/UpdateResourceType' + required: + - id + - type + type: object + UpdateResourceAttributes: + 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 comma-delimited string representation of 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 + UpdateResourceRequest: + description: The JSON:API request for updating a Confluent resource. + properties: + data: + $ref: '#/components/schemas/UpdateResource' + required: + - data + type: object + UpdateResourceType: + 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 UsageApplicationSecurityMonitoringResponse: description: Application Security Monitoring usage response. properties: @@ -9708,6 +9987,649 @@ paths: tags: - Opsgenie Integration x-codegen-request-body-name: body + /api/v2/integrations/confluent-cloud/accounts: + get: + description: Get a Confluent account with the provided account id. + operationId: ConfluentCloudPublic1 + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountConfigsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List Confluent accounts + tags: + - Confluent Cloud Accounts API + x-dd-ownership: + notification_configuration: + manual_escalation_policy: '[production][team][web-integrations]' + prod_high_urgency: '@pagerduty-web-integrations-high-urgency @slack-web-integrations-ops' + prod_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + slack_support_channel: '#web-integrations' + staging_high_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + staging_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + team: web-integrations + team_escalation: '[production][team][web-integrations]' + x-permission: + operator: OR + permissions: + - STANDARD + post: + description: Create a Confluent account. + operationId: ConfluentCloudPublic3 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddAccountRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountConfigResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Add Confluent account + tags: + - Confluent Cloud Accounts API + x-codegen-request-body-name: body + x-dd-ownership: + notification_configuration: + manual_escalation_policy: '[production][team][web-integrations]' + prod_high_urgency: '@pagerduty-web-integrations-high-urgency @slack-web-integrations-ops' + prod_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + slack_support_channel: '#web-integrations' + staging_high_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + staging_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + team: web-integrations + team_escalation: '[production][team][web-integrations]' + x-permission: + operator: OR + permissions: + - STANDARD + /api/v2/integrations/confluent-cloud/accounts/{account_id}: + delete: + description: Delete a Confluent account with the provided account ID. + operationId: ConfluentCloudPublic5 + parameters: + - description: None + in: path + name: account_id + required: true + schema: + type: string + responses: + '204': + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete Confluent account + tags: + - Confluent Cloud Accounts API + x-dd-ownership: + notification_configuration: + manual_escalation_policy: '[production][team][web-integrations]' + prod_high_urgency: '@pagerduty-web-integrations-high-urgency @slack-web-integrations-ops' + prod_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + slack_support_channel: '#web-integrations' + staging_high_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + staging_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + team: web-integrations + team_escalation: '[production][team][web-integrations]' + x-permission: + operator: OR + permissions: + - STANDARD + get: + description: Get the Confluent account with the provided account ID. + operationId: ConfluentCloudPublic2 + parameters: + - description: None + in: path + name: account_id + required: true + schema: + type: string + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountConfigResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get Confluent account + tags: + - Confluent Cloud Accounts API + x-dd-ownership: + notification_configuration: + manual_escalation_policy: '[production][team][web-integrations]' + prod_high_urgency: '@pagerduty-web-integrations-high-urgency @slack-web-integrations-ops' + prod_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + slack_support_channel: '#web-integrations' + staging_high_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + staging_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + team: web-integrations + team_escalation: '[production][team][web-integrations]' + x-permission: + operator: OR + permissions: + - STANDARD + patch: + description: Update the Confluent account with the provided account ID. + operationId: ConfluentCloudPublic4 + parameters: + - description: None + in: path + name: account_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAccountRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountConfigResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update Confluent account + tags: + - Confluent Cloud Accounts API + x-codegen-request-body-name: body + x-dd-ownership: + notification_configuration: + manual_escalation_policy: '[production][team][web-integrations]' + prod_high_urgency: '@pagerduty-web-integrations-high-urgency @slack-web-integrations-ops' + prod_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + slack_support_channel: '#web-integrations' + staging_high_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + staging_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + team: web-integrations + team_escalation: '[production][team][web-integrations]' + x-permission: + operator: OR + permissions: + - STANDARD + /api/v2/integrations/confluent-cloud/accounts/{account_id}/resources: + get: + description: Get a Confluent resource for the account associated with the provided + ID. + operationId: ConfluentCloudPublic6 + parameters: + - description: None + in: path + name: account_id + required: true + schema: + type: string + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountConfigResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List Confluent Account resources + tags: + - Confluent Cloud Accounts API + x-dd-ownership: + notification_configuration: + manual_escalation_policy: '[production][team][web-integrations]' + prod_high_urgency: '@pagerduty-web-integrations-high-urgency @slack-web-integrations-ops' + prod_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + slack_support_channel: '#web-integrations' + staging_high_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + staging_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + team: web-integrations + team_escalation: '[production][team][web-integrations]' + x-permission: + operator: OR + permissions: + - STANDARD + post: + description: Create a Confluent resource for the account associated with the + provided ID. + operationId: ConfluentCloudPublic8 + parameters: + - description: None + in: path + name: account_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentCloudResourceRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentCloudResourceResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Add resource to Confluent account + tags: + - Confluent Cloud Accounts API + x-codegen-request-body-name: body + x-dd-ownership: + notification_configuration: + manual_escalation_policy: '[production][team][web-integrations]' + prod_high_urgency: '@pagerduty-web-integrations-high-urgency @slack-web-integrations-ops' + prod_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + slack_support_channel: '#web-integrations' + staging_high_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + staging_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + team: web-integrations + team_escalation: '[production][team][web-integrations]' + x-permission: + operator: OR + permissions: + - STANDARD + /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: ConfluentCloudPublic10 + parameters: + - description: None + in: path + name: account_id + required: true + schema: + type: string + - description: None + in: path + name: resource_id + required: true + schema: + type: string + responses: + '204': + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete resource from Confluent account + tags: + - Confluent Cloud Accounts API + x-dd-ownership: + notification_configuration: + manual_escalation_policy: '[production][team][web-integrations]' + prod_high_urgency: '@pagerduty-web-integrations-high-urgency @slack-web-integrations-ops' + prod_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + slack_support_channel: '#web-integrations' + staging_high_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + staging_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + team: web-integrations + team_escalation: '[production][team][web-integrations]' + x-permission: + operator: OR + permissions: + - STANDARD + get: + description: Get a Confluent resource with the provided resource id for the + account associated with the provided account ID. + operationId: ConfluentCloudPublic7 + parameters: + - description: None + in: path + name: account_id + required: true + schema: + type: string + - description: None + in: path + name: resource_id + required: true + schema: + type: string + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentCloudResourcesResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get resource from Confluent account + tags: + - Confluent Cloud Accounts API + x-dd-ownership: + notification_configuration: + manual_escalation_policy: '[production][team][web-integrations]' + prod_high_urgency: '@pagerduty-web-integrations-high-urgency @slack-web-integrations-ops' + prod_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + slack_support_channel: '#web-integrations' + staging_high_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + staging_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + team: web-integrations + team_escalation: '[production][team][web-integrations]' + x-permission: + operator: OR + permissions: + - STANDARD + patch: + description: Update a Confluent resource with the provided resource id for the + account associated with the provided account ID. + operationId: ConfluentCloudPublic9 + parameters: + - description: None + in: path + name: account_id + required: true + schema: + type: string + - description: None + in: path + name: resource_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateResourceRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentCloudResourceResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update resource in Confluent account + tags: + - Confluent Cloud Accounts API + x-codegen-request-body-name: body + x-dd-ownership: + notification_configuration: + manual_escalation_policy: '[production][team][web-integrations]' + prod_high_urgency: '@pagerduty-web-integrations-high-urgency @slack-web-integrations-ops' + prod_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + slack_support_channel: '#web-integrations' + staging_high_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + staging_low_urgency: '@pagerduty-web-integrations-low-urgency @slack-web-integrations-ops' + team: web-integrations + team_escalation: '[production][team][web-integrations]' + x-permission: + operator: OR + permissions: + - STANDARD /api/v2/logs: post: description: 'Send your logs to your Datadog platform over HTTP. Limits per @@ -14405,6 +15327,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 Accounts API - 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/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic1.ts b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic1.ts new file mode 100644 index 000000000000..188409b5e819 --- /dev/null +++ b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic1.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.ConfluentCloudAccountsAPIApi(configuration); + +apiInstance + .confluentCloudPublic1() + .then((data: v2.AccountConfigsResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic10.ts b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic10.ts new file mode 100644 index 000000000000..eceb0233eae7 --- /dev/null +++ b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic10.ts @@ -0,0 +1,22 @@ +/** + * Delete resource from Confluent account returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ConfluentCloudAccountsAPIApi(configuration); + +const params: v2.ConfluentCloudAccountsAPIApiConfluentCloudPublic10Request = { + accountId: "account_id", + resourceId: "resource_id", +}; + +apiInstance + .confluentCloudPublic10(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-accounts-api/ConfluentCloudPublic2.ts b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic2.ts new file mode 100644 index 000000000000..321f740ad18b --- /dev/null +++ b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic2.ts @@ -0,0 +1,21 @@ +/** + * Get Confluent account returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ConfluentCloudAccountsAPIApi(configuration); + +const params: v2.ConfluentCloudAccountsAPIApiConfluentCloudPublic2Request = { + accountId: "account_id", +}; + +apiInstance + .confluentCloudPublic2(params) + .then((data: v2.AccountConfigResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic3.ts b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic3.ts new file mode 100644 index 000000000000..9f1c60c5893b --- /dev/null +++ b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic3.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.ConfluentCloudAccountsAPIApi(configuration); + +const params: v2.ConfluentCloudAccountsAPIApiConfluentCloudPublic3Request = { + body: { + data: { + attributes: { + apiKey: "TESTAPIKEY123", + apiSecret: "test-api-secret-123", + resources: [ + { + id: "resource_id_abc123", + resourceType: "kafka", + tags: ["myTag", "myTag2:myValue"], + }, + ], + tags: ["myTag", "myTag2:myValue"], + }, + type: "confluent-cloud-accounts", + }, + }, +}; + +apiInstance + .confluentCloudPublic3(params) + .then((data: v2.AccountConfigResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic4.ts b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic4.ts new file mode 100644 index 000000000000..41842384d649 --- /dev/null +++ b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic4.ts @@ -0,0 +1,31 @@ +/** + * Update Confluent account returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ConfluentCloudAccountsAPIApi(configuration); + +const params: v2.ConfluentCloudAccountsAPIApiConfluentCloudPublic4Request = { + body: { + data: { + attributes: { + apiKey: "TESTAPIKEY123", + apiSecret: "test-api-secret-123", + tags: ["myTag", "myTag2:myValue"], + }, + type: "confluent-cloud-accounts", + }, + }, + accountId: "account_id", +}; + +apiInstance + .confluentCloudPublic4(params) + .then((data: v2.AccountConfigResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic5.ts b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic5.ts new file mode 100644 index 000000000000..f346b5cfe447 --- /dev/null +++ b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic5.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.ConfluentCloudAccountsAPIApi(configuration); + +const params: v2.ConfluentCloudAccountsAPIApiConfluentCloudPublic5Request = { + accountId: "account_id", +}; + +apiInstance + .confluentCloudPublic5(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-accounts-api/ConfluentCloudPublic6.ts b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic6.ts new file mode 100644 index 000000000000..13289faca3f1 --- /dev/null +++ b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic6.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.ConfluentCloudAccountsAPIApi(configuration); + +const params: v2.ConfluentCloudAccountsAPIApiConfluentCloudPublic6Request = { + accountId: "account_id", +}; + +apiInstance + .confluentCloudPublic6(params) + .then((data: v2.AccountConfigResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic7.ts b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic7.ts new file mode 100644 index 000000000000..ac1454507db8 --- /dev/null +++ b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic7.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.ConfluentCloudAccountsAPIApi(configuration); + +const params: v2.ConfluentCloudAccountsAPIApiConfluentCloudPublic7Request = { + accountId: "account_id", + resourceId: "resource_id", +}; + +apiInstance + .confluentCloudPublic7(params) + .then((data: v2.ConfluentCloudResourcesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic8.ts b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic8.ts new file mode 100644 index 000000000000..71eae4f32419 --- /dev/null +++ b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic8.ts @@ -0,0 +1,28 @@ +/** + * Add resource to Confluent account returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ConfluentCloudAccountsAPIApi(configuration); + +const params: v2.ConfluentCloudAccountsAPIApiConfluentCloudPublic8Request = { + body: { + data: { + id: "resource_id_abc123", + resourceType: "kafka", + tags: ["myTag", "myTag2:myValue"], + }, + }, + accountId: "account_id", +}; + +apiInstance + .confluentCloudPublic8(params) + .then((data: v2.ConfluentCloudResourceResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic9.ts b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic9.ts new file mode 100644 index 000000000000..081990a667d4 --- /dev/null +++ b/examples/v2/confluent-cloud-accounts-api/ConfluentCloudPublic9.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.ConfluentCloudAccountsAPIApi(configuration); + +const params: v2.ConfluentCloudAccountsAPIApiConfluentCloudPublic9Request = { + body: { + data: { + attributes: { + resourceType: "kafka", + tags: ["myTag", "myTag2:myValue"], + }, + id: "resource-id-123", + type: "confluent-cloud-resources", + }, + }, + accountId: "account_id", + resourceId: "resource_id", +}; + +apiInstance + .confluentCloudPublic9(params) + .then((data: v2.ConfluentCloudResourceResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/v2/confluent_cloud_accounts_api.feature b/features/v2/confluent_cloud_accounts_api.feature new file mode 100644 index 000000000000..a9f880061c05 --- /dev/null +++ b/features/v2/confluent_cloud_accounts_api.feature @@ -0,0 +1,159 @@ +@endpoint(confluent-cloud-accounts-api) @endpoint(confluent-cloud-accounts-api-v2) +Feature: Confluent Cloud Accounts API + 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 "ConfluentCloudAccountsAPI" API + + @generated @skip @team:Datadog/web-integrations + Scenario: Add Confluent account returns "API error response." response + Given new "ConfluentCloudPublic3" request + And body with value {"data": {"attributes": {"api_key": "TESTAPIKEY123", "api_secret": "test-api-secret-123", "resources": [{"id": "resource_id_abc123", "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 API error response. + + @generated @skip @team:Datadog/web-integrations + Scenario: Add Confluent account returns "OK" response + Given new "ConfluentCloudPublic3" request + And body with value {"data": {"attributes": {"api_key": "TESTAPIKEY123", "api_secret": "test-api-secret-123", "resources": [{"id": "resource_id_abc123", "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 "API error response." response + Given new "ConfluentCloudPublic8" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"id": "resource_id_abc123", "resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}} + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:Datadog/web-integrations + Scenario: Add resource to Confluent account returns "OK" response + Given new "ConfluentCloudPublic8" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"id": "resource_id_abc123", "resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}} + When the request is sent + Then the response status is 201 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: Delete Confluent account returns "API error response." response + Given new "ConfluentCloudPublic5" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:Datadog/web-integrations + Scenario: Delete Confluent account returns "OK" response + Given new "ConfluentCloudPublic5" 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 "API error response." response + Given new "ConfluentCloudPublic10" 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 API error response. + + @generated @skip @team:Datadog/web-integrations + Scenario: Delete resource from Confluent account returns "OK" response + Given new "ConfluentCloudPublic10" 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 204 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: Get Confluent account returns "API error response." response + Given new "ConfluentCloudPublic2" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:Datadog/web-integrations + Scenario: Get Confluent account returns "OK" response + Given new "ConfluentCloudPublic2" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 201 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: Get resource from Confluent account returns "API error response." response + Given new "ConfluentCloudPublic7" 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 API error response. + + @generated @skip @team:Datadog/web-integrations + Scenario: Get resource from Confluent account returns "OK" response + Given new "ConfluentCloudPublic7" 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 201 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: List Confluent Account resources returns "API error response." response + Given new "ConfluentCloudPublic6" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:Datadog/web-integrations + Scenario: List Confluent Account resources returns "OK" response + Given new "ConfluentCloudPublic6" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 201 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: List Confluent accounts returns "API error response." response + Given new "ConfluentCloudPublic1" request + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:Datadog/web-integrations + Scenario: List Confluent accounts returns "OK" response + Given new "ConfluentCloudPublic1" request + When the request is sent + Then the response status is 201 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: Update Confluent account returns "API error response." response + Given new "ConfluentCloudPublic4" 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 API error response. + + @generated @skip @team:Datadog/web-integrations + Scenario: Update Confluent account returns "OK" response + Given new "ConfluentCloudPublic4" 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 201 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: Update resource in Confluent account returns "API error response." response + Given new "ConfluentCloudPublic9" 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 API error response. + + @generated @skip @team:Datadog/web-integrations + Scenario: Update resource in Confluent account returns "OK" response + Given new "ConfluentCloudPublic9" 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 201 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index 936716051f5d..4c7c6e135f06 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -256,6 +256,66 @@ "type": "idempotent" } }, + "ConfluentCloudPublic1": { + "tag": "Confluent Cloud Accounts API", + "undo": { + "type": "safe" + } + }, + "ConfluentCloudPublic3": { + "tag": "Confluent Cloud Accounts API", + "undo": { + "type": "safe" + } + }, + "ConfluentCloudPublic5": { + "tag": "Confluent Cloud Accounts API", + "undo": { + "type": "safe" + } + }, + "ConfluentCloudPublic2": { + "tag": "Confluent Cloud Accounts API", + "undo": { + "type": "safe" + } + }, + "ConfluentCloudPublic4": { + "tag": "Confluent Cloud Accounts API", + "undo": { + "type": "safe" + } + }, + "ConfluentCloudPublic6": { + "tag": "Confluent Cloud Accounts API", + "undo": { + "type": "safe" + } + }, + "ConfluentCloudPublic8": { + "tag": "Confluent Cloud Accounts API", + "undo": { + "type": "safe" + } + }, + "ConfluentCloudPublic10": { + "tag": "Confluent Cloud Accounts API", + "undo": { + "type": "safe" + } + }, + "ConfluentCloudPublic7": { + "tag": "Confluent Cloud Accounts API", + "undo": { + "type": "safe" + } + }, + "ConfluentCloudPublic9": { + "tag": "Confluent Cloud Accounts API", + "undo": { + "type": "safe" + } + }, "SubmitLog": { "tag": "Logs", "undo": { diff --git a/packages/datadog-api-client-v2/apis/ConfluentCloudAccountsAPIApi.ts b/packages/datadog-api-client-v2/apis/ConfluentCloudAccountsAPIApi.ts new file mode 100644 index 000000000000..2a5c4eaf1ed3 --- /dev/null +++ b/packages/datadog-api-client-v2/apis/ConfluentCloudAccountsAPIApi.ts @@ -0,0 +1,1523 @@ +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 { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; +import { isCodeInRange } from "../../datadog-api-client-common/util"; + +import { AccountConfigResponse } from "../models/AccountConfigResponse"; +import { AccountConfigsResponse } from "../models/AccountConfigsResponse"; +import { AddAccountRequest } from "../models/AddAccountRequest"; +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { ConfluentCloudResourceRequest } from "../models/ConfluentCloudResourceRequest"; +import { ConfluentCloudResourceResponse } from "../models/ConfluentCloudResourceResponse"; +import { ConfluentCloudResourcesResponse } from "../models/ConfluentCloudResourcesResponse"; +import { UpdateAccountRequest } from "../models/UpdateAccountRequest"; +import { UpdateResourceRequest } from "../models/UpdateResourceRequest"; + +export class ConfluentCloudAccountsAPIApiRequestFactory extends BaseAPIRequestFactory { + public async confluentCloudPublic1( + _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.ConfluentCloudAccountsAPIApi.confluentCloudPublic1" + ).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 confluentCloudPublic10( + 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 confluentCloudPublic10." + ); + } + + // 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 confluentCloudPublic10." + ); + } + + // 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.ConfluentCloudAccountsAPIApi.confluentCloudPublic10" + ).makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async confluentCloudPublic2( + 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 confluentCloudPublic2." + ); + } + + // 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.ConfluentCloudAccountsAPIApi.confluentCloudPublic2" + ).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 confluentCloudPublic3( + body: AddAccountRequest, + _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 confluentCloudPublic3." + ); + } + + // Path Params + const localVarPath = "/api/v2/integrations/confluent-cloud/accounts"; + + // Make Request Context + const requestContext = getServer( + _config, + "v2.ConfluentCloudAccountsAPIApi.confluentCloudPublic3" + ).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, "AddAccountRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async confluentCloudPublic4( + accountId: string, + body: UpdateAccountRequest, + _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 confluentCloudPublic4." + ); + } + + // 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 confluentCloudPublic4." + ); + } + + // 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.ConfluentCloudAccountsAPIApi.confluentCloudPublic4" + ).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, "UpdateAccountRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async confluentCloudPublic5( + 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 confluentCloudPublic5." + ); + } + + // 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.ConfluentCloudAccountsAPIApi.confluentCloudPublic5" + ).makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async confluentCloudPublic6( + 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 confluentCloudPublic6." + ); + } + + // 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.ConfluentCloudAccountsAPIApi.confluentCloudPublic6" + ).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 confluentCloudPublic7( + 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 confluentCloudPublic7." + ); + } + + // 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 confluentCloudPublic7." + ); + } + + // 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.ConfluentCloudAccountsAPIApi.confluentCloudPublic7" + ).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 confluentCloudPublic8( + accountId: string, + body: ConfluentCloudResourceRequest, + _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 confluentCloudPublic8." + ); + } + + // 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 confluentCloudPublic8." + ); + } + + // 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.ConfluentCloudAccountsAPIApi.confluentCloudPublic8" + ).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, "ConfluentCloudResourceRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async confluentCloudPublic9( + accountId: string, + resourceId: string, + body: UpdateResourceRequest, + _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 confluentCloudPublic9." + ); + } + + // 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 confluentCloudPublic9." + ); + } + + // 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 confluentCloudPublic9." + ); + } + + // 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.ConfluentCloudAccountsAPIApi.confluentCloudPublic9" + ).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, "UpdateResourceRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class ConfluentCloudAccountsAPIApiResponseProcessor { + /** + * 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 confluentCloudPublic1 + * @throws ApiException if the response code was not in [200, 299] + */ + public async confluentCloudPublic1( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (isCodeInRange("201", response.httpStatusCode)) { + const body: AccountConfigsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AccountConfigsResponse", + "" + ) as AccountConfigsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(400, body); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(403, body); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(404, body); + } + if (isCodeInRange("429", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(429, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AccountConfigsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AccountConfigsResponse", + "" + ) as AccountConfigsResponse; + 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 confluentCloudPublic10 + * @throws ApiException if the response code was not in [200, 299] + */ + public async confluentCloudPublic10( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(400, body); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(403, body); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(404, body); + } + if (isCodeInRange("429", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(429, 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 confluentCloudPublic2 + * @throws ApiException if the response code was not in [200, 299] + */ + public async confluentCloudPublic2( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (isCodeInRange("201", response.httpStatusCode)) { + const body: AccountConfigResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AccountConfigResponse", + "" + ) as AccountConfigResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(400, body); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(403, body); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(404, body); + } + if (isCodeInRange("429", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(429, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AccountConfigResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AccountConfigResponse", + "" + ) as AccountConfigResponse; + 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 confluentCloudPublic3 + * @throws ApiException if the response code was not in [200, 299] + */ + public async confluentCloudPublic3( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (isCodeInRange("201", response.httpStatusCode)) { + const body: AccountConfigResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AccountConfigResponse", + "" + ) as AccountConfigResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(400, body); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(403, body); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(404, body); + } + if (isCodeInRange("429", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(429, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AccountConfigResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AccountConfigResponse", + "" + ) as AccountConfigResponse; + 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 confluentCloudPublic4 + * @throws ApiException if the response code was not in [200, 299] + */ + public async confluentCloudPublic4( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (isCodeInRange("201", response.httpStatusCode)) { + const body: AccountConfigResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AccountConfigResponse", + "" + ) as AccountConfigResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(400, body); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(403, body); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(404, body); + } + if (isCodeInRange("429", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(429, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AccountConfigResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AccountConfigResponse", + "" + ) as AccountConfigResponse; + 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 confluentCloudPublic5 + * @throws ApiException if the response code was not in [200, 299] + */ + public async confluentCloudPublic5(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(400, body); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(403, body); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(404, body); + } + if (isCodeInRange("429", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(429, 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 confluentCloudPublic6 + * @throws ApiException if the response code was not in [200, 299] + */ + public async confluentCloudPublic6( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (isCodeInRange("201", response.httpStatusCode)) { + const body: AccountConfigResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AccountConfigResponse", + "" + ) as AccountConfigResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(400, body); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(403, body); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(404, body); + } + if (isCodeInRange("429", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(429, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AccountConfigResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AccountConfigResponse", + "" + ) as AccountConfigResponse; + 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 confluentCloudPublic7 + * @throws ApiException if the response code was not in [200, 299] + */ + public async confluentCloudPublic7( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (isCodeInRange("201", response.httpStatusCode)) { + const body: ConfluentCloudResourcesResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentCloudResourcesResponse", + "" + ) as ConfluentCloudResourcesResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(400, body); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(403, body); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(404, body); + } + if (isCodeInRange("429", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(429, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ConfluentCloudResourcesResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentCloudResourcesResponse", + "" + ) as ConfluentCloudResourcesResponse; + 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 confluentCloudPublic8 + * @throws ApiException if the response code was not in [200, 299] + */ + public async confluentCloudPublic8( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (isCodeInRange("201", response.httpStatusCode)) { + const body: ConfluentCloudResourceResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentCloudResourceResponse", + "" + ) as ConfluentCloudResourceResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(400, body); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(403, body); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(404, body); + } + if (isCodeInRange("429", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(429, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ConfluentCloudResourceResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentCloudResourceResponse", + "" + ) as ConfluentCloudResourceResponse; + 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 confluentCloudPublic9 + * @throws ApiException if the response code was not in [200, 299] + */ + public async confluentCloudPublic9( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (isCodeInRange("201", response.httpStatusCode)) { + const body: ConfluentCloudResourceResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentCloudResourceResponse", + "" + ) as ConfluentCloudResourceResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(400, body); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(403, body); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(404, body); + } + if (isCodeInRange("429", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(429, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ConfluentCloudResourceResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConfluentCloudResourceResponse", + "" + ) as ConfluentCloudResourceResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface ConfluentCloudAccountsAPIApiConfluentCloudPublic10Request { + /** + * None + * @type string + */ + accountId: string; + /** + * None + * @type string + */ + resourceId: string; +} + +export interface ConfluentCloudAccountsAPIApiConfluentCloudPublic2Request { + /** + * None + * @type string + */ + accountId: string; +} + +export interface ConfluentCloudAccountsAPIApiConfluentCloudPublic3Request { + /** + * @type AddAccountRequest + */ + body: AddAccountRequest; +} + +export interface ConfluentCloudAccountsAPIApiConfluentCloudPublic4Request { + /** + * None + * @type string + */ + accountId: string; + /** + * @type UpdateAccountRequest + */ + body: UpdateAccountRequest; +} + +export interface ConfluentCloudAccountsAPIApiConfluentCloudPublic5Request { + /** + * None + * @type string + */ + accountId: string; +} + +export interface ConfluentCloudAccountsAPIApiConfluentCloudPublic6Request { + /** + * None + * @type string + */ + accountId: string; +} + +export interface ConfluentCloudAccountsAPIApiConfluentCloudPublic7Request { + /** + * None + * @type string + */ + accountId: string; + /** + * None + * @type string + */ + resourceId: string; +} + +export interface ConfluentCloudAccountsAPIApiConfluentCloudPublic8Request { + /** + * None + * @type string + */ + accountId: string; + /** + * @type ConfluentCloudResourceRequest + */ + body: ConfluentCloudResourceRequest; +} + +export interface ConfluentCloudAccountsAPIApiConfluentCloudPublic9Request { + /** + * None + * @type string + */ + accountId: string; + /** + * None + * @type string + */ + resourceId: string; + /** + * @type UpdateResourceRequest + */ + body: UpdateResourceRequest; +} + +export class ConfluentCloudAccountsAPIApi { + private requestFactory: ConfluentCloudAccountsAPIApiRequestFactory; + private responseProcessor: ConfluentCloudAccountsAPIApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: ConfluentCloudAccountsAPIApiRequestFactory, + responseProcessor?: ConfluentCloudAccountsAPIApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || + new ConfluentCloudAccountsAPIApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new ConfluentCloudAccountsAPIApiResponseProcessor(); + } + + /** + * Get a Confluent account with the provided account id. + * @param param The request object + */ + public confluentCloudPublic1( + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.confluentCloudPublic1(options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.confluentCloudPublic1(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 confluentCloudPublic10( + param: ConfluentCloudAccountsAPIApiConfluentCloudPublic10Request, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.confluentCloudPublic10( + param.accountId, + param.resourceId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.confluentCloudPublic10(responseContext); + }); + }); + } + + /** + * Get the Confluent account with the provided account ID. + * @param param The request object + */ + public confluentCloudPublic2( + param: ConfluentCloudAccountsAPIApiConfluentCloudPublic2Request, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.confluentCloudPublic2( + param.accountId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.confluentCloudPublic2(responseContext); + }); + }); + } + + /** + * Create a Confluent account. + * @param param The request object + */ + public confluentCloudPublic3( + param: ConfluentCloudAccountsAPIApiConfluentCloudPublic3Request, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.confluentCloudPublic3( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.confluentCloudPublic3(responseContext); + }); + }); + } + + /** + * Update the Confluent account with the provided account ID. + * @param param The request object + */ + public confluentCloudPublic4( + param: ConfluentCloudAccountsAPIApiConfluentCloudPublic4Request, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.confluentCloudPublic4( + param.accountId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.confluentCloudPublic4(responseContext); + }); + }); + } + + /** + * Delete a Confluent account with the provided account ID. + * @param param The request object + */ + public confluentCloudPublic5( + param: ConfluentCloudAccountsAPIApiConfluentCloudPublic5Request, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.confluentCloudPublic5( + param.accountId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.confluentCloudPublic5(responseContext); + }); + }); + } + + /** + * Get a Confluent resource for the account associated with the provided ID. + * @param param The request object + */ + public confluentCloudPublic6( + param: ConfluentCloudAccountsAPIApiConfluentCloudPublic6Request, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.confluentCloudPublic6( + param.accountId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.confluentCloudPublic6(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 confluentCloudPublic7( + param: ConfluentCloudAccountsAPIApiConfluentCloudPublic7Request, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.confluentCloudPublic7( + param.accountId, + param.resourceId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.confluentCloudPublic7(responseContext); + }); + }); + } + + /** + * Create a Confluent resource for the account associated with the provided ID. + * @param param The request object + */ + public confluentCloudPublic8( + param: ConfluentCloudAccountsAPIApiConfluentCloudPublic8Request, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.confluentCloudPublic8( + param.accountId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.confluentCloudPublic8(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 confluentCloudPublic9( + param: ConfluentCloudAccountsAPIApiConfluentCloudPublic9Request, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.confluentCloudPublic9( + param.accountId, + param.resourceId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.confluentCloudPublic9(responseContext); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 7be1dda1b97a..e8d2f5719543 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 { + ConfluentCloudAccountsAPIApiConfluentCloudPublic10Request, + ConfluentCloudAccountsAPIApiConfluentCloudPublic2Request, + ConfluentCloudAccountsAPIApiConfluentCloudPublic3Request, + ConfluentCloudAccountsAPIApiConfluentCloudPublic4Request, + ConfluentCloudAccountsAPIApiConfluentCloudPublic5Request, + ConfluentCloudAccountsAPIApiConfluentCloudPublic6Request, + ConfluentCloudAccountsAPIApiConfluentCloudPublic7Request, + ConfluentCloudAccountsAPIApiConfluentCloudPublic8Request, + ConfluentCloudAccountsAPIApiConfluentCloudPublic9Request, + ConfluentCloudAccountsAPIApi, +} from "./apis/ConfluentCloudAccountsAPIApi"; + export { DashboardListsApiCreateDashboardListItemsRequest, DashboardListsApiDeleteDashboardListItemsRequest, @@ -219,6 +232,15 @@ export { UsersApi, } from "./apis/UsersApi"; +export { AccountConfig } from "./models/AccountConfig"; +export { AccountConfigAttributes } from "./models/AccountConfigAttributes"; +export { AccountConfigResponse } from "./models/AccountConfigResponse"; +export { AccountConfigsResponse } from "./models/AccountConfigsResponse"; +export { AccountConfigType } from "./models/AccountConfigType"; +export { AddAccount } from "./models/AddAccount"; +export { AddAccountAttributes } from "./models/AddAccountAttributes"; +export { AddAccountRequest } from "./models/AddAccountRequest"; +export { AddAccountType } from "./models/AddAccountType"; export { APIErrorResponse } from "./models/APIErrorResponse"; export { APIKeyCreateAttributes } from "./models/APIKeyCreateAttributes"; export { APIKeyCreateData } from "./models/APIKeyCreateData"; @@ -287,6 +309,10 @@ export { CloudWorkloadSecurityAgentRuleUpdateAttributes } from "./models/CloudWo export { CloudWorkloadSecurityAgentRuleUpdateData } from "./models/CloudWorkloadSecurityAgentRuleUpdateData"; export { CloudWorkloadSecurityAgentRuleUpdaterAttributes } from "./models/CloudWorkloadSecurityAgentRuleUpdaterAttributes"; export { CloudWorkloadSecurityAgentRuleUpdateRequest } from "./models/CloudWorkloadSecurityAgentRuleUpdateRequest"; +export { ConfluentCloudResource } from "./models/ConfluentCloudResource"; +export { ConfluentCloudResourceRequest } from "./models/ConfluentCloudResourceRequest"; +export { ConfluentCloudResourceResponse } from "./models/ConfluentCloudResourceResponse"; +export { ConfluentCloudResourcesResponse } from "./models/ConfluentCloudResourcesResponse"; export { ContentEncoding } from "./models/ContentEncoding"; export { CostByOrg } from "./models/CostByOrg"; export { CostByOrgAttributes } from "./models/CostByOrgAttributes"; @@ -710,6 +736,14 @@ export { SecurityMonitoringTriageUser } from "./models/SecurityMonitoringTriageU export { ServiceAccountCreateAttributes } from "./models/ServiceAccountCreateAttributes"; export { ServiceAccountCreateData } from "./models/ServiceAccountCreateData"; export { ServiceAccountCreateRequest } from "./models/ServiceAccountCreateRequest"; +export { UpdateAccount } from "./models/UpdateAccount"; +export { UpdateAccountAttributes } from "./models/UpdateAccountAttributes"; +export { UpdateAccountRequest } from "./models/UpdateAccountRequest"; +export { UpdateAccountType } from "./models/UpdateAccountType"; +export { UpdateResource } from "./models/UpdateResource"; +export { UpdateResourceAttributes } from "./models/UpdateResourceAttributes"; +export { UpdateResourceRequest } from "./models/UpdateResourceRequest"; +export { UpdateResourceType } from "./models/UpdateResourceType"; export { UsageApplicationSecurityMonitoringResponse } from "./models/UsageApplicationSecurityMonitoringResponse"; export { UsageAttributesObject } from "./models/UsageAttributesObject"; export { UsageDataObject } from "./models/UsageDataObject"; diff --git a/packages/datadog-api-client-v2/models/AccountConfig.ts b/packages/datadog-api-client-v2/models/AccountConfig.ts new file mode 100644 index 000000000000..e427be82b2bf --- /dev/null +++ b/packages/datadog-api-client-v2/models/AccountConfig.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 { AccountConfigAttributes } from "./AccountConfigAttributes"; +import { AccountConfigType } from "./AccountConfigType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * An API key and API secret pair that represents a Confluent account. + */ +export class AccountConfig { + /** + * The attributes of a Confluent account. + */ + "attributes": AccountConfigAttributes; + /** + * 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": AccountConfigType; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "AccountConfigAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "AccountConfigType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AccountConfig.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AccountConfigAttributes.ts b/packages/datadog-api-client-v2/models/AccountConfigAttributes.ts new file mode 100644 index 000000000000..92d66891bba0 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AccountConfigAttributes.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 { ConfluentCloudResource } from "./ConfluentCloudResource"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The attributes of a Confluent account. + */ +export class AccountConfigAttributes { + /** + * 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 comma-delimited string representation of 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 AccountConfigAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AccountConfigResponse.ts b/packages/datadog-api-client-v2/models/AccountConfigResponse.ts new file mode 100644 index 000000000000..53d7b5d87e36 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AccountConfigResponse.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 { AccountConfig } from "./AccountConfig"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The expected response schema when getting a Confluent account. + */ +export class AccountConfigResponse { + /** + * An API key and API secret pair that represents a Confluent account. + */ + "data"?: AccountConfig; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "AccountConfig", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AccountConfigResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AccountConfigType.ts b/packages/datadog-api-client-v2/models/AccountConfigType.ts new file mode 100644 index 000000000000..f5dbdeeb4530 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AccountConfigType.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 AccountConfigType = typeof CONFLUENT_CLOUD_ACCOUNTS; +export const CONFLUENT_CLOUD_ACCOUNTS = "confluent-cloud-accounts"; diff --git a/packages/datadog-api-client-v2/models/AccountConfigsResponse.ts b/packages/datadog-api-client-v2/models/AccountConfigsResponse.ts new file mode 100644 index 000000000000..205fa790ab00 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AccountConfigsResponse.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 { AccountConfig } from "./AccountConfig"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Confluent account returned by the API. + */ +export class AccountConfigsResponse { + /** + * The Confluent account. + */ + "data"?: Array; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AccountConfigsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AddAccount.ts b/packages/datadog-api-client-v2/models/AddAccount.ts new file mode 100644 index 000000000000..1052bcc7c95a --- /dev/null +++ b/packages/datadog-api-client-v2/models/AddAccount.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 { AddAccountAttributes } from "./AddAccountAttributes"; +import { AddAccountType } from "./AddAccountType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The data body for adding a Confluent account. + */ +export class AddAccount { + /** + * Attributes associated with the account creation request. + */ + "attributes": AddAccountAttributes; + /** + * The JSON:API type. Will always be `confluent-cloud-accounts`. + */ + "type": AddAccountType; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "AddAccountAttributes", + required: true, + }, + type: { + baseName: "type", + type: "AddAccountType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AddAccount.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AddAccountAttributes.ts b/packages/datadog-api-client-v2/models/AddAccountAttributes.ts new file mode 100644 index 000000000000..41c3fed4077b --- /dev/null +++ b/packages/datadog-api-client-v2/models/AddAccountAttributes.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 { ConfluentCloudResource } from "./ConfluentCloudResource"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes associated with the account creation request. + */ +export class AddAccountAttributes { + /** + * 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 comma-delimited string representation of 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 AddAccountAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AddAccountRequest.ts b/packages/datadog-api-client-v2/models/AddAccountRequest.ts new file mode 100644 index 000000000000..ccd60342a9d3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AddAccountRequest.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 { AddAccount } from "./AddAccount"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Payload schema when adding a Confluent account. + */ +export class AddAccountRequest { + /** + * The data body for adding a Confluent account. + */ + "data": AddAccount; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "AddAccount", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AddAccountRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AddAccountType.ts b/packages/datadog-api-client-v2/models/AddAccountType.ts new file mode 100644 index 000000000000..ce0d67748a0a --- /dev/null +++ b/packages/datadog-api-client-v2/models/AddAccountType.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 AddAccountType = typeof CONFLUENT_CLOUD_ACCOUNTS; +export const CONFLUENT_CLOUD_ACCOUNTS = "confluent-cloud-accounts"; diff --git a/packages/datadog-api-client-v2/models/ConfluentCloudResource.ts b/packages/datadog-api-client-v2/models/ConfluentCloudResource.ts new file mode 100644 index 000000000000..c7d3c85885f0 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentCloudResource.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"; + +/** + * Model representation of a Confluent Cloud resource. + */ +export class ConfluentCloudResource { + /** + * The ID associated with the Confluent resource. + */ + "id": string; + /** + * The resource type of the Resource. Can be `kafka`, `connector`, `ksql`, or `schema_registry`. + */ + "resourceType": string; + /** + * A comma-delimited string representation of 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", + required: true, + }, + resourceType: { + baseName: "resource_type", + type: "string", + required: true, + }, + tags: { + baseName: "tags", + type: "Array", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentCloudResource.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentCloudResourceRequest.ts b/packages/datadog-api-client-v2/models/ConfluentCloudResourceRequest.ts new file mode 100644 index 000000000000..37b897c338df --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentCloudResourceRequest.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 { ConfluentCloudResource } from "./ConfluentCloudResource"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Payload schema when interacting with a Confluent resource. + */ +export class ConfluentCloudResourceRequest { + /** + * Model representation of a Confluent Cloud resource. + */ + "data": ConfluentCloudResource; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ConfluentCloudResource", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentCloudResourceRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentCloudResourceResponse.ts b/packages/datadog-api-client-v2/models/ConfluentCloudResourceResponse.ts new file mode 100644 index 000000000000..4df38f23692b --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentCloudResourceResponse.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 { ConfluentCloudResource } from "./ConfluentCloudResource"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response schema when interacting with a Confluent resource. + */ +export class ConfluentCloudResourceResponse { + /** + * Model representation of a Confluent Cloud resource. + */ + "data"?: ConfluentCloudResource; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ConfluentCloudResource", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ConfluentCloudResourceResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ConfluentCloudResourcesResponse.ts b/packages/datadog-api-client-v2/models/ConfluentCloudResourcesResponse.ts new file mode 100644 index 000000000000..4881a685b697 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ConfluentCloudResourcesResponse.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 { ConfluentCloudResource } from "./ConfluentCloudResource"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response schema when interacting with a list of Confluent resources. + */ +export class ConfluentCloudResourcesResponse { + /** + * 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 ConfluentCloudResourcesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 0cf58e5de6bf..e1982b6fce23 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -8,6 +8,13 @@ import { APIKeyUpdateAttributes } from "./APIKeyUpdateAttributes"; import { APIKeyUpdateData } from "./APIKeyUpdateData"; import { APIKeyUpdateRequest } from "./APIKeyUpdateRequest"; import { APIKeysResponse } from "./APIKeysResponse"; +import { AccountConfig } from "./AccountConfig"; +import { AccountConfigAttributes } from "./AccountConfigAttributes"; +import { AccountConfigResponse } from "./AccountConfigResponse"; +import { AccountConfigsResponse } from "./AccountConfigsResponse"; +import { AddAccount } from "./AddAccount"; +import { AddAccountAttributes } from "./AddAccountAttributes"; +import { AddAccountRequest } from "./AddAccountRequest"; import { ApplicationKeyCreateAttributes } from "./ApplicationKeyCreateAttributes"; import { ApplicationKeyCreateData } from "./ApplicationKeyCreateData"; import { ApplicationKeyCreateRequest } from "./ApplicationKeyCreateRequest"; @@ -53,6 +60,10 @@ import { CloudWorkloadSecurityAgentRuleUpdateData } from "./CloudWorkloadSecurit import { CloudWorkloadSecurityAgentRuleUpdateRequest } from "./CloudWorkloadSecurityAgentRuleUpdateRequest"; import { CloudWorkloadSecurityAgentRuleUpdaterAttributes } from "./CloudWorkloadSecurityAgentRuleUpdaterAttributes"; import { CloudWorkloadSecurityAgentRulesListResponse } from "./CloudWorkloadSecurityAgentRulesListResponse"; +import { ConfluentCloudResource } from "./ConfluentCloudResource"; +import { ConfluentCloudResourceRequest } from "./ConfluentCloudResourceRequest"; +import { ConfluentCloudResourceResponse } from "./ConfluentCloudResourceResponse"; +import { ConfluentCloudResourcesResponse } from "./ConfluentCloudResourcesResponse"; import { CostByOrg } from "./CostByOrg"; import { CostByOrgAttributes } from "./CostByOrgAttributes"; import { CostByOrgResponse } from "./CostByOrgResponse"; @@ -378,6 +389,12 @@ import { SecurityMonitoringTriageUser } from "./SecurityMonitoringTriageUser"; import { ServiceAccountCreateAttributes } from "./ServiceAccountCreateAttributes"; import { ServiceAccountCreateData } from "./ServiceAccountCreateData"; import { ServiceAccountCreateRequest } from "./ServiceAccountCreateRequest"; +import { UpdateAccount } from "./UpdateAccount"; +import { UpdateAccountAttributes } from "./UpdateAccountAttributes"; +import { UpdateAccountRequest } from "./UpdateAccountRequest"; +import { UpdateResource } from "./UpdateResource"; +import { UpdateResourceAttributes } from "./UpdateResourceAttributes"; +import { UpdateResourceRequest } from "./UpdateResourceRequest"; import { UsageApplicationSecurityMonitoringResponse } from "./UsageApplicationSecurityMonitoringResponse"; import { UsageAttributesObject } from "./UsageAttributesObject"; import { UsageDataObject } from "./UsageDataObject"; @@ -438,6 +455,8 @@ const enumsMap: { [key: string]: any[] } = { "-name", ], APIKeysType: ["api_keys"], + AccountConfigType: ["confluent-cloud-accounts"], + AddAccountType: ["confluent-cloud-accounts"], ApplicationKeysSort: [ "created_at", "-created_at", @@ -638,6 +657,8 @@ const enumsMap: { [key: string]: any[] } = { SecurityMonitoringSignalState: ["open", "archived", "under_review"], SecurityMonitoringSignalType: ["signal"], SecurityMonitoringSignalsSort: ["timestamp", "-timestamp"], + UpdateAccountType: ["confluent-cloud-accounts"], + UpdateResourceType: ["confluent-cloud-resources"], UsageTimeSeriesType: ["usage_timeseries"], UserInvitationsType: ["user_invitations"], UsersType: ["users"], @@ -654,6 +675,13 @@ const typeMap: { [index: string]: any } = { APIKeyUpdateData: APIKeyUpdateData, APIKeyUpdateRequest: APIKeyUpdateRequest, APIKeysResponse: APIKeysResponse, + AccountConfig: AccountConfig, + AccountConfigAttributes: AccountConfigAttributes, + AccountConfigResponse: AccountConfigResponse, + AccountConfigsResponse: AccountConfigsResponse, + AddAccount: AddAccount, + AddAccountAttributes: AddAccountAttributes, + AddAccountRequest: AddAccountRequest, ApplicationKeyCreateAttributes: ApplicationKeyCreateAttributes, ApplicationKeyCreateData: ApplicationKeyCreateData, ApplicationKeyCreateRequest: ApplicationKeyCreateRequest, @@ -710,6 +738,10 @@ const typeMap: { [index: string]: any } = { CloudWorkloadSecurityAgentRuleUpdaterAttributes, CloudWorkloadSecurityAgentRulesListResponse: CloudWorkloadSecurityAgentRulesListResponse, + ConfluentCloudResource: ConfluentCloudResource, + ConfluentCloudResourceRequest: ConfluentCloudResourceRequest, + ConfluentCloudResourceResponse: ConfluentCloudResourceResponse, + ConfluentCloudResourcesResponse: ConfluentCloudResourcesResponse, CostByOrg: CostByOrg, CostByOrgAttributes: CostByOrgAttributes, CostByOrgResponse: CostByOrgResponse, @@ -1063,6 +1095,12 @@ const typeMap: { [index: string]: any } = { ServiceAccountCreateAttributes: ServiceAccountCreateAttributes, ServiceAccountCreateData: ServiceAccountCreateData, ServiceAccountCreateRequest: ServiceAccountCreateRequest, + UpdateAccount: UpdateAccount, + UpdateAccountAttributes: UpdateAccountAttributes, + UpdateAccountRequest: UpdateAccountRequest, + UpdateResource: UpdateResource, + UpdateResourceAttributes: UpdateResourceAttributes, + UpdateResourceRequest: UpdateResourceRequest, UsageApplicationSecurityMonitoringResponse: UsageApplicationSecurityMonitoringResponse, UsageAttributesObject: UsageAttributesObject, diff --git a/packages/datadog-api-client-v2/models/UpdateAccount.ts b/packages/datadog-api-client-v2/models/UpdateAccount.ts new file mode 100644 index 000000000000..85933415e5c3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateAccount.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 { UpdateAccountAttributes } from "./UpdateAccountAttributes"; +import { UpdateAccountType } from "./UpdateAccountType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Data object for updating a Confluent account. + */ +export class UpdateAccount { + /** + * Attributes object for updating a Confluent account. + */ + "attributes": UpdateAccountAttributes; + /** + * The JSON:API type for this request. + */ + "type": UpdateAccountType; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "UpdateAccountAttributes", + required: true, + }, + type: { + baseName: "type", + type: "UpdateAccountType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateAccount.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateAccountAttributes.ts b/packages/datadog-api-client-v2/models/UpdateAccountAttributes.ts new file mode 100644 index 000000000000..982a17ade78b --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateAccountAttributes.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 UpdateAccountAttributes { + /** + * The API key associated with your Confluent account. + */ + "apiKey": string; + /** + * The API secret associated with your Confluent account. + */ + "apiSecret": string; + /** + * A comma-delimited string representation of 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 UpdateAccountAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateAccountRequest.ts b/packages/datadog-api-client-v2/models/UpdateAccountRequest.ts new file mode 100644 index 000000000000..9eeb4df5ec2f --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateAccountRequest.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 { UpdateAccount } from "./UpdateAccount"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The JSON:API request for updating a Confluent account. + */ +export class UpdateAccountRequest { + /** + * Data object for updating a Confluent account. + */ + "data": UpdateAccount; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "UpdateAccount", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateAccountRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateAccountType.ts b/packages/datadog-api-client-v2/models/UpdateAccountType.ts new file mode 100644 index 000000000000..7f8edde61cca --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateAccountType.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 UpdateAccountType = typeof CONFLUENT_CLOUD_ACCOUNTS; +export const CONFLUENT_CLOUD_ACCOUNTS = "confluent-cloud-accounts"; diff --git a/packages/datadog-api-client-v2/models/UpdateResource.ts b/packages/datadog-api-client-v2/models/UpdateResource.ts new file mode 100644 index 000000000000..d55007e93cd7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateResource.ts @@ -0,0 +1,61 @@ +/** + * 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 { UpdateResourceAttributes } from "./UpdateResourceAttributes"; +import { UpdateResourceType } from "./UpdateResourceType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * JSON:API request for updating a Confluent resource. + */ +export class UpdateResource { + /** + * Attributes object for updating a Confluent resource. + */ + "attributes"?: UpdateResourceAttributes; + /** + * The ID associated with a Confluent resource. + */ + "id": string; + /** + * The JSON:API type for this request. + */ + "type": UpdateResourceType; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "UpdateResourceAttributes", + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "UpdateResourceType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateResource.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateResourceAttributes.ts b/packages/datadog-api-client-v2/models/UpdateResourceAttributes.ts new file mode 100644 index 000000000000..f2d224914df9 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateResourceAttributes.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 UpdateResourceAttributes { + /** + * The resource type of the Resource. Can be `kafka`, `connector`, `ksql`, or `schema_registry`. + */ + "resourceType"?: string; + /** + * A comma-delimited string representation of 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 UpdateResourceAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateResourceRequest.ts b/packages/datadog-api-client-v2/models/UpdateResourceRequest.ts new file mode 100644 index 000000000000..3a458d994374 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateResourceRequest.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 { UpdateResource } from "./UpdateResource"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The JSON:API request for updating a Confluent resource. + */ +export class UpdateResourceRequest { + /** + * JSON:API request for updating a Confluent resource. + */ + "data": UpdateResource; + + /** + * @ignore + */ + "unparsedObject"?: any; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "UpdateResource", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateResourceRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateResourceType.ts b/packages/datadog-api-client-v2/models/UpdateResourceType.ts new file mode 100644 index 000000000000..f35bee038ad8 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateResourceType.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 UpdateResourceType = typeof CONFLUENT_CLOUD_RESOURCES; +export const CONFLUENT_CLOUD_RESOURCES = "confluent-cloud-resources";