From 9b2205591f9837df2c7777fb8f9a5042022f6970 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 12 May 2025 19:50:49 +0000 Subject: [PATCH] Regenerate client from commit a4fe251b of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 510 +++++++++++++ .../frozen.json | 1 + .../recording.har | 67 ++ .../frozen.json | 1 + .../recording.har | 147 ++++ .../frozen.json | 1 + .../recording.har | 57 ++ .../frozen.json | 1 + .../recording.har | 57 ++ .../frozen.json | 1 + .../recording.har | 147 ++++ .../frozen.json | 1 + .../recording.har | 147 ++++ .../frozen.json | 1 + .../recording.har | 157 ++++ .../frozen.json | 1 + .../recording.har | 67 ++ .../frozen.json | 1 + .../recording.har | 157 ++++ .../v2/oci-integration/CreateTenancyConfig.ts | 47 ++ .../v2/oci-integration/DeleteTenancyConfig.ts | 24 + .../v2/oci-integration/GetTenancyConfig.ts | 24 + .../v2/oci-integration/GetTenancyConfigs.ts | 17 + .../v2/oci-integration/UpdateTenancyConfig.ts | 40 ++ features/support/scenarios_model_mapping.ts | 35 + features/v2/given.json | 12 + features/v2/oci_integration.feature | 99 +++ features/v2/undo.json | 37 + .../apis/OCIIntegrationApi.ts | 669 ++++++++++++++++++ packages/datadog-api-client-v2/index.ts | 25 + .../models/AuthCredentials.ts | 62 ++ .../models/CreateTenancyConfigData.ts | 72 ++ .../CreateTenancyConfigDataAttributes.ts | 132 ++++ .../models/CreateTenancyConfigDataType.ts | 14 + .../models/CreateTenancyConfigRequest.ts | 53 ++ .../models/OCILogsConfig.ts | 68 ++ .../models/OCIMetricsConfig.ts | 68 ++ .../models/ObjectSerializer.ts | 31 + .../models/RegionsConfig.ts | 68 ++ .../models/TenancyConfig.ts | 53 ++ .../models/TenancyConfigData.ts | 71 ++ .../models/TenancyConfigDataAttributes.ts | 136 ++++ .../models/TenancyConfigDataType.ts | 14 + .../models/TenancyConfigList.ts | 54 ++ .../models/UpdateTenancyConfigData.ts | 72 ++ .../UpdateTenancyConfigDataAttributes.ts | 104 +++ .../models/UpdateTenancyConfigDataType.ts | 14 + .../models/UpdateTenancyConfigRequest.ts | 53 ++ 49 files changed, 3694 insertions(+), 4 deletions(-) create mode 100644 cassettes/v2/OCI-Integration_3690011872/Create-tenancy-config-returns-Bad-Request-response_2786146663/frozen.json create mode 100644 cassettes/v2/OCI-Integration_3690011872/Create-tenancy-config-returns-Bad-Request-response_2786146663/recording.har create mode 100644 cassettes/v2/OCI-Integration_3690011872/Delete-tenancy-config-returns-No-Content-response_3638260110/frozen.json create mode 100644 cassettes/v2/OCI-Integration_3690011872/Delete-tenancy-config-returns-No-Content-response_3638260110/recording.har create mode 100644 cassettes/v2/OCI-Integration_3690011872/Delete-tenancy-config-returns-Not-Found-response_1993953303/frozen.json create mode 100644 cassettes/v2/OCI-Integration_3690011872/Delete-tenancy-config-returns-Not-Found-response_1993953303/recording.har create mode 100644 cassettes/v2/OCI-Integration_3690011872/Get-tenancy-config-returns-Not-Found-response_3312022242/frozen.json create mode 100644 cassettes/v2/OCI-Integration_3690011872/Get-tenancy-config-returns-Not-Found-response_3312022242/recording.har create mode 100644 cassettes/v2/OCI-Integration_3690011872/Get-tenancy-config-returns-OK-response_242331701/frozen.json create mode 100644 cassettes/v2/OCI-Integration_3690011872/Get-tenancy-config-returns-OK-response_242331701/recording.har create mode 100644 cassettes/v2/OCI-Integration_3690011872/Get-tenancy-configs-returns-OK-response_1900329318/frozen.json create mode 100644 cassettes/v2/OCI-Integration_3690011872/Get-tenancy-configs-returns-OK-response_1900329318/recording.har create mode 100644 cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-Bad-Request-response_1998385874/frozen.json create mode 100644 cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-Bad-Request-response_1998385874/recording.har create mode 100644 cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-Not-Found-response_4110866433/frozen.json create mode 100644 cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-Not-Found-response_4110866433/recording.har create mode 100644 cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-OK-response_4283832400/frozen.json create mode 100644 cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-OK-response_4283832400/recording.har create mode 100644 examples/v2/oci-integration/CreateTenancyConfig.ts create mode 100644 examples/v2/oci-integration/DeleteTenancyConfig.ts create mode 100644 examples/v2/oci-integration/GetTenancyConfig.ts create mode 100644 examples/v2/oci-integration/GetTenancyConfigs.ts create mode 100644 examples/v2/oci-integration/UpdateTenancyConfig.ts create mode 100644 features/v2/oci_integration.feature create mode 100644 packages/datadog-api-client-v2/apis/OCIIntegrationApi.ts create mode 100644 packages/datadog-api-client-v2/models/AuthCredentials.ts create mode 100644 packages/datadog-api-client-v2/models/CreateTenancyConfigData.ts create mode 100644 packages/datadog-api-client-v2/models/CreateTenancyConfigDataAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/CreateTenancyConfigDataType.ts create mode 100644 packages/datadog-api-client-v2/models/CreateTenancyConfigRequest.ts create mode 100644 packages/datadog-api-client-v2/models/OCILogsConfig.ts create mode 100644 packages/datadog-api-client-v2/models/OCIMetricsConfig.ts create mode 100644 packages/datadog-api-client-v2/models/RegionsConfig.ts create mode 100644 packages/datadog-api-client-v2/models/TenancyConfig.ts create mode 100644 packages/datadog-api-client-v2/models/TenancyConfigData.ts create mode 100644 packages/datadog-api-client-v2/models/TenancyConfigDataAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/TenancyConfigDataType.ts create mode 100644 packages/datadog-api-client-v2/models/TenancyConfigList.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateTenancyConfigData.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateTenancyConfigDataAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateTenancyConfigDataType.ts create mode 100644 packages/datadog-api-client-v2/models/UpdateTenancyConfigRequest.ts diff --git a/.apigentools-info b/.apigentools-info index 9a07abe92393..552c7cd786ca 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-05-12 09:40:18.957439", - "spec_repo_commit": "c4d0aeef" + "regenerated": "2025-05-12 19:49:05.393746", + "spec_repo_commit": "a4fe251b" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-05-12 09:40:19.013366", - "spec_repo_commit": "c4d0aeef" + "regenerated": "2025-05-12 19:49:05.410412", + "spec_repo_commit": "a4fe251b" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index cd58a11bc088..6ad1c0a8cad8 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -814,6 +814,13 @@ components: required: true schema: type: string + TenancyOCIDPathParameter: + description: Unique tenancy OCID of the OCI integration config. + in: path + name: tenancy_ocid + required: true + schema: + type: string UserID: description: The ID of the user. in: path @@ -3640,6 +3647,23 @@ components: from the other indexes type: string type: object + AuthCredentials: + description: The auth credentials of the user. Consists of a public key fingerprint + and private key. + properties: + fingerprint: + description: The public key fingerprint. + example: c8:e5:54:f2:da:a2:d7:b0:ed:f4:79:47:93:64:12:b1 + type: string + private_key: + description: The `RSA` private key in `PEM` format. + example: '----BEGIN PRIVATE KEY-----MIIEvgIBADANBgkqhkiG9w0BAQEFAA----END + PRIVATE KEY-----' + type: string + required: + - fingerprint + - private_key + type: object AuthNMapping: description: The AuthN Mapping object returned by API. properties: @@ -9605,6 +9629,107 @@ components: type: $ref: '#/components/schemas/RuleType' type: object + CreateTenancyConfigData: + description: The definition of `CreateTenancyConfigData` object. + properties: + attributes: + $ref: '#/components/schemas/CreateTenancyConfigDataAttributes' + id: + description: The OCID of the tenancy to be integrated. + example: ocid1.tenancy.test + type: string + type: + $ref: '#/components/schemas/CreateTenancyConfigDataType' + required: + - type + - id + type: object + CreateTenancyConfigDataAttributes: + description: The definition of `CreateTenancyConfigDataAttributes` object. + properties: + auth_credentials: + $ref: '#/components/schemas/AuthCredentials' + config_version: + description: The config version. It is not recommended to add or change + this value, as it is determined internally. + format: int64 + type: integer + dd_compartment_id: + description: The OCID of the compartment containing Datadog managed resources. + type: string + dd_stack_id: + description: The OCID of the resource manager stack for creating Datadog + managed resources. + type: string + home_region: + description: The home region of the tenancy to be integrated. + example: us-ashburn-1 + type: string + logs_config: + $ref: '#/components/schemas/OCILogsConfig' + metrics_config: + $ref: '#/components/schemas/OCIMetricsConfig' + regions_config: + $ref: '#/components/schemas/RegionsConfig' + resource_collection_enabled: + description: Enable or disable resource collection. + type: boolean + user_ocid: + description: The OCID of the user needed to authenticate and collect data. + example: ocid1.user.test + type: string + required: + - auth_credentials + - home_region + - user_ocid + type: object + CreateTenancyConfigDataType: + default: oci_tenancy + description: OCI tenancy resource type. + enum: + - oci_tenancy + example: oci_tenancy + type: string + x-enum-varnames: + - OCI_TENANCY + CreateTenancyConfigRequest: + description: The definition of `CreateTenancyConfigRequest` object. + example: + data: + attributes: + auth_credentials: + fingerprint: a7:b5:54:f2:da:a2:d7:b0:ed:f4:79:47:93:64:12:b1 + private_key: '-----BEGIN PRIVATE KEY----- + + o9kEwoumo8yHVn5Ztp4F2cxaD6+MzSJ/I6WesPyePUD7sPeorXByg1UNOXyzqDub + + /aU4/sNo2f8epM9l7QGiCtY= + + -----END PRIVATE KEY-----' + config_version: 2 + home_region: us-ashburn-1 + logs_config: + compartment_tag_filters: + - datadog:true + - env:prod + enabled: true + enabled_services: + - oacnativeproduction + metrics_config: + compartment_tag_filters: + - datadog:true + - env:prod + enabled: true + excluded_services: + - oci_compute + resource_collection_enabled: true + user_ocid: ocid1.user.test + id: ocid1.tenancy.dummy_value + type: oci_tenancy + properties: + data: + $ref: '#/components/schemas/CreateTenancyConfigData' + type: object CreateWorkflowRequest: description: A request object for creating a new workflow. example: @@ -23310,6 +23435,43 @@ components: - id - type type: object + OCILogsConfig: + description: The definition of `OCILogsConfig` object. + properties: + compartment_tag_filters: + description: The compartment tag filters to apply to log collection. Each + value represents a Datadog tag in the format key:value. + items: + type: string + type: array + enabled: + description: Enable or disable log collection. Disabled by default. + type: boolean + enabled_services: + description: The list of services to enable for log collection. + items: + type: string + type: array + type: object + OCIMetricsConfig: + description: The definition of `OCIMetricsConfig` object. + properties: + compartment_tag_filters: + description: The compartment tag filters to apply to metric collection. + Each value represents a Datadog tag in the format key:value. + items: + type: string + type: array + enabled: + description: Enable or disable metric collection. Enabled by default for + all services. + type: boolean + excluded_services: + description: The list of services to exclude from metric collection. + items: + type: string + type: array + type: object ObservabilityPipeline: description: Top-level schema representing a pipeline. properties: @@ -28838,6 +29000,25 @@ components: x-enum-varnames: - ANY - ALL + RegionsConfig: + description: The definition of `RegionsConfig` object. + properties: + available: + description: The list of regions currently subscribed to . + items: + type: string + type: array + disabled: + description: The list of disabled regions. + items: + type: string + type: array + enabled: + description: The list of enabled regions. + items: + type: string + type: array + type: object RelationType: description: Supported relation types. enum: @@ -38294,6 +38475,124 @@ components: description: Offset type. type: string type: object + TenancyConfig: + description: The definition of `TenancyConfig` object. + example: + data: + attributes: + cost_collection_enabled: false + home_region: us-ashburn-1 + logs_config: + compartment_tag_filters: + - compartment.test + enabled: true + enabled_services: + - compute + metrics_config: + compartment_tag_filters: + - compartment.test + enabled: true + excluded_services: + - compute + resource_collection_enabled: true + user_ocid: ocid1.user.test + id: ocid1.tenancy.test + type: oci_tenancy + properties: + data: + $ref: '#/components/schemas/TenancyConfigData' + type: object + TenancyConfigData: + description: The definition of `TenancyConfigData` object. + properties: + attributes: + $ref: '#/components/schemas/TenancyConfigDataAttributes' + id: + description: The OCID of the tenancy config. + type: string + type: + $ref: '#/components/schemas/TenancyConfigDataType' + required: + - type + type: object + TenancyConfigDataAttributes: + description: The definition of `TenancyConfigDataAttributes` object. + properties: + config_version: + description: The config version. It is not recommended to add or change + this value, as it is determined internally. + format: int64 + type: integer + cost_collection_enabled: + description: Enable or disable cost collection. + type: boolean + dd_compartment_id: + description: The OCID of the compartment containing Datadog managed resources. + type: string + dd_stack_id: + description: The OCID of the resource manager stack for creating Datadog + managed resources. + type: string + home_region: + description: The home region of the tenancy to be integrated. + type: string + logs_config: + $ref: '#/components/schemas/OCILogsConfig' + metrics_config: + $ref: '#/components/schemas/OCIMetricsConfig' + regions_config: + $ref: '#/components/schemas/RegionsConfig' + resource_collection_enabled: + description: Enable or disable resource collection. + type: boolean + tenancy_name: + description: The attribute's tenancy_name. + type: string + user_ocid: + description: The OCID of the user needed to authenticate and collect data. + type: string + type: object + TenancyConfigDataType: + default: oci_tenancy + description: OCI tenancy resource type. + enum: + - oci_tenancy + example: oci_tenancy + type: string + x-enum-varnames: + - OCI_TENANCY + TenancyConfigList: + description: The definition of `TenancyConfigList` object. + example: + data: + - attributes: + config_version: 2 + home_region: us-ashburn-1 + logs_config: + compartment_tag_filters: + - compartment.test + enabled: true + enabled_services: + - compute + metrics_config: + compartment_tag_filters: + - compartment.test + enabled: true + excluded_services: + - compute + resource_collection_enabled: true + user_ocid: ocid1.user.test + id: ocid1.tenancy.test + type: oci_tenancy + properties: + data: + description: The `TenancyConfigList` data. + items: + $ref: '#/components/schemas/TenancyConfigData' + type: array + required: + - data + type: object TimeAggregation: description: 'Time aggregation period (in seconds) is used to aggregate the results of the notification rule evaluation. @@ -38870,6 +39169,79 @@ components: type: $ref: '#/components/schemas/RuleType' type: object + UpdateTenancyConfigData: + description: The definition of `UpdateTenancyConfigData` object. + properties: + attributes: + $ref: '#/components/schemas/UpdateTenancyConfigDataAttributes' + id: + description: The OCID of the tenancy to be integrated. + example: ocid1.tenancy.test + type: string + type: + $ref: '#/components/schemas/UpdateTenancyConfigDataType' + required: + - type + - id + type: object + UpdateTenancyConfigDataAttributes: + description: The definition of `UpdateTenancyConfigDataAttributes` object. + properties: + auth_credentials: + $ref: '#/components/schemas/AuthCredentials' + home_region: + description: The home region of the tenancy to be integrated. + type: string + logs_config: + $ref: '#/components/schemas/OCILogsConfig' + metrics_config: + $ref: '#/components/schemas/OCIMetricsConfig' + regions_config: + $ref: '#/components/schemas/RegionsConfig' + resource_collection_enabled: + description: Enable or disable resource collection. + type: boolean + user_ocid: + description: The OCID of the user needed to authenticate and collect data. + type: string + type: object + UpdateTenancyConfigDataType: + default: oci_tenancy + description: OCI tenancy resource type. + enum: + - oci_tenancy + example: oci_tenancy + type: string + x-enum-varnames: + - OCI_TENANCY + UpdateTenancyConfigRequest: + description: The definition of `UpdateTenancyConfigRequest` object. + example: + data: + attributes: + home_region: us-ashburn-1 + logs_config: + compartment_tag_filters: + - datadog:true + - env:prod + enabled: true + enabled_services: + - objectstorage + metrics_config: + compartment_tag_filters: + - datadog:true + - env:prod + enabled: true + excluded_services: + - oci_compute + resource_collection_enabled: true + user_ocid: ocid1.user.test + id: ocid1.tenancy.dummy_value + type: oci_tenancy + properties: + data: + $ref: '#/components/schemas/UpdateTenancyConfigData' + type: object UpdateWorkflowRequest: description: A request object for updating an existing workflow. example: @@ -47615,6 +47987,139 @@ paths: tags: - Microsoft Teams Integration x-codegen-request-body-name: body + /api/v2/integration/oci/tenancies: + get: + description: List all tenancy integrations. + operationId: GetTenancyConfigs + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TenancyConfigList' + description: OK + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get tenancy configs + tags: + - OCI Integration + x-permission: + operator: AND + permissions: + - oci_configuration_read + post: + description: Create a new tenancy config. + operationId: CreateTenancyConfig + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTenancyConfigRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/TenancyConfig' + description: Created + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create tenancy config + tags: + - OCI Integration + x-permission: + operator: AND + permissions: + - oci_configurations_manage + /api/v2/integration/oci/tenancies/{tenancy_ocid}: + delete: + description: Delete an existing tenancy config. + operationId: DeleteTenancyConfig + parameters: + - $ref: '#/components/parameters/TenancyOCIDPathParameter' + responses: + '204': + description: No Content + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete tenancy config + tags: + - OCI Integration + x-permission: + operator: AND + permissions: + - oci_configurations_manage + get: + description: Get a single tenancy config object. + operationId: GetTenancyConfig + parameters: + - $ref: '#/components/parameters/TenancyOCIDPathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TenancyConfig' + description: OK + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get tenancy config + tags: + - OCI Integration + x-permission: + operator: AND + permissions: + - oci_configuration_read + patch: + description: Update an existing tenancy config. + operationId: UpdateTenancyConfig + parameters: + - $ref: '#/components/parameters/TenancyOCIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateTenancyConfigRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TenancyConfig' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update tenancy config + tags: + - OCI Integration + x-permission: + operator: AND + permissions: + - oci_configuration_edit /api/v2/integration/opsgenie/services: get: description: Get a list of all services from the Datadog Opsgenie integration. @@ -61876,6 +62381,11 @@ tags: and their attributes. See the [Network Device Monitoring page](https://docs.datadoghq.com/network_monitoring/) for more information. name: Network Device Monitoring +- description: 'Configure your Datadog-OCI integration directly through the Datadog + API. + + For more information, see the [OCI integration page](https://docs.datadoghq.com/integrations/oracle_cloud_infrastructure/).' + name: OCI Integration - description: Observability Pipelines allows you to collect and process logs within your own infrastructure, and then route them to downstream integrations. externalDocs: diff --git a/cassettes/v2/OCI-Integration_3690011872/Create-tenancy-config-returns-Bad-Request-response_2786146663/frozen.json b/cassettes/v2/OCI-Integration_3690011872/Create-tenancy-config-returns-Bad-Request-response_2786146663/frozen.json new file mode 100644 index 000000000000..779bbd6874c9 --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Create-tenancy-config-returns-Bad-Request-response_2786146663/frozen.json @@ -0,0 +1 @@ +"2025-05-08T15:48:41.992Z" diff --git a/cassettes/v2/OCI-Integration_3690011872/Create-tenancy-config-returns-Bad-Request-response_2786146663/recording.har b/cassettes/v2/OCI-Integration_3690011872/Create-tenancy-config-returns-Bad-Request-response_2786146663/recording.har new file mode 100644 index 000000000000..9a6f183504a6 --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Create-tenancy-config-returns-Bad-Request-response_2786146663/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "OCI Integration/Create tenancy config returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "7d093b8091fb682bbced34f25262563f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 609, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 579, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"auth_credentials\":{\"fingerprint\":\"a7:b5:54:f2:da:a2:d7:b0:ed:f4:79:47:93:64:12:b1\",\"private_key\":\"-----BEGIN PRIVATE KEY-----\\nMIIEv\\n-----END PRIVATE KEY-----\\n\"},\"config_version\":2,\"home_region\":\"us-ashburn-1\",\"logs_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":true,\"enabled_services\":[\"oacnativeproduction\"]},\"metrics_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":true,\"excluded_services\":[\"oci_compute\"]},\"resource_collection_enabled\":true,\"user_ocid\":\"ocid1.user.test\"},\"id\":\"ocid1.tenancy.dummy_value\",\"type\":\"oci_tenancy\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies" + }, + "response": { + "bodySize": 82, + "content": { + "mimeType": "application/vnd.api+json", + "size": 82, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"invalid private key\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 668, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-05-08T15:48:41.997Z", + "time": 133 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/OCI-Integration_3690011872/Delete-tenancy-config-returns-No-Content-response_3638260110/frozen.json b/cassettes/v2/OCI-Integration_3690011872/Delete-tenancy-config-returns-No-Content-response_3638260110/frozen.json new file mode 100644 index 000000000000..51c17e64a1fc --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Delete-tenancy-config-returns-No-Content-response_3638260110/frozen.json @@ -0,0 +1 @@ +"2025-05-07T20:00:06.021Z" diff --git a/cassettes/v2/OCI-Integration_3690011872/Delete-tenancy-config-returns-No-Content-response_3638260110/recording.har b/cassettes/v2/OCI-Integration_3690011872/Delete-tenancy-config-returns-No-Content-response_3638260110/recording.har new file mode 100644 index 000000000000..e35440ec5023 --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Delete-tenancy-config-returns-No-Content-response_3638260110/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "OCI Integration/Delete tenancy config returns \"No Content\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "77430fbdd56edaf8041c701da397c8c3", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 2271, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 580, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"auth_credentials\":{\"fingerprint\":\"c8:e5:54:f2:da:a2:d7:b0:ed:f4:79:47:93:64:12:b1\",\"private_key\":\"-----BEGIN PRIVATE KEY-----\\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCmMo2jwJXWTt0y\\nk+X6biZycflZSwOAP/iNeAZPTWwhYxj9pxDvd5OfiIe+o/7eupk/3q+fRsSaztPn\\nJwI/JnbQz5IT5miLi/apIozg870FFxjrgRxSGjo7BNH0dLKITc5nLDLBnOEzxR2Y\\nk9+0dFaiNlcodFULlg75trqbILRSc6jn9Tp9G8C5e9cj+LYQuUu2JwIqhCJqcNcU\\nt+lRL5odBJhZ85KlugKyUg6LN3VQIdOpTtPBMXYA1oBgDCbe5Rw5yzgnd0KtSFf3\\nGOmLfR95gQshLfbGavLOTh9ioaOj/2hT9HrsEe1VWgX3m1WibqKiPc4OA4BGGToN\\n9tzN/t89AgMBAAECggEAVFKD4JherXwX6Ih3f6cRZLGFBJP1s8VBM225LdUnTo07\\n6b4w7n6p7KBV1xjXwGPGS0yNqG88YxsbEkWNc0Ltt6YJBIW7d0nNHSVFewDPX1zH\\nrP01xEZAUx9v8uqehl+LoHchTXBuJlkVWgt0zdbU+bo+YG0dlSJOeM4IQZrHQqlQ\\ne4PNk73rot9NSqiKQFXUroaoVPTkUHb3idpLX60K3MgIBoAm4DpJ6cMItb4hyHv5\\npNZhHQbr9Eciz2tj+OhQTYKCrAd0gJgl0tC+6L3kzkmiYE3ceGphqWfI9bX52Y96\\nwpgAtYi6o8wTykgRLabLc6vSQ9RegWEh7P8iSAvAlQKBgQDX5wJhYeWDdG4uPqLC\\nX3EtnR3y5zYgOd7cVtMr1DIvXa4I8PSIOC4Wnb/5A1S03dJ2e8GJ/qSbl5R2fsDr\\nXhjIm/KeBPI9p2dVZM8fPoWppR3SgDaHY5qxAED111DnEZuTMl5BO87QZXurTSiF\\nfbGsWaVqdVieRAQ3b5DEkC9TSwKBgQDFEFgui7iyPhQaQafsjnVbWyrWF821xjTG\\nb6Bo4FO97c9pw/tbkpfM+dcOU4SsZL8HjwGBUhUsDsVOX7m/sWRjZqNM5t/VR+52\\n9ygIPEjNyh0b3aARgn8AQ8n+RZvl1Z2A32KCO3MFzhpVKnv2sdSc1TNHQkuJH/rq\\neUAm3El6lwKBgQCK8w+jIOAXRB2NAZ66PbaXRqD5rTg2cUguwmpRsNVDiqTw+DJI\\nYO+4enoMhspDROeofWlHqGzD/j/8KwN59ys4ILV6YXCNoWltmd17HD/luHCDAyUU\\n6VOrSqCEF7jnnXtktmvWy+kEUevPiW7kyspIQ8GjzDXmVZvpGZIwDyOGFQKBgGtS\\nl3PiDFimjnQuRbIDc86pPA8VL6dLpvpbWNVFNtY9abSEU6RvldTATGs0+RCaXZ9U\\nNtGjTnyMHtCsOZE4nx+zikQbiNOzNR/9QwQZMN1Csc+3R7HBjEEsqhmc92aYjArf\\nndqnXeFPee/gD1svRkeTpTWt2U146UJBfrqrRilJAoGAQp7FtEtps5I9xK92AVpD\\nHj2p1JNKzLCRtWQ8j4jthKqR0iTQ9SwQyjiAvcKc7HdMaG11gmr5XbmKAzelVC+f\\no9kEwoumo8yHVn5Ztp4F2cxaD6+MzSJ/I6WesPyePUD7sPeorXByg1UNOXyzqDub\\n/aU4/sNo2f8epM9l7QGiCtY=\\n-----END PRIVATE KEY-----\\n\"},\"config_version\":2,\"home_region\":\"us-ashburn-1\",\"logs_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":true,\"enabled_services\":[\"oci_compute\"]},\"metrics_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":true,\"excluded_services\":[\"oacnativeproduction\"]},\"resource_collection_enabled\":true,\"user_ocid\":\"ocid1.user.test\"},\"id\":\"ocid1.tenancy.test\",\"type\":\"oci_tenancy\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies" + }, + "response": { + "bodySize": 131, + "content": { + "mimeType": "application/vnd.api+json", + "size": 131, + "text": "{\"data\":{\"id\":\"ocid1.tenancy.test\",\"type\":\"oci_tenancy\",\"attributes\":{\"home_region\":\"us-ashburn-1\",\"user_ocid\":\"ocid1.user.test\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 669, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2025-05-07T20:00:06.024Z", + "time": 180 + }, + { + "_id": "86db074bb9f74cfc6ca3911ddad7bbd1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 534, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies/ocid1.tenancy.test" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 608, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-05-07T20:00:06.210Z", + "time": 256 + }, + { + "_id": "86db074bb9f74cfc6ca3911ddad7bbd1", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 534, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies/ocid1.tenancy.test" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"tenancy not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 668, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-05-07T20:00:06.471Z", + "time": 166 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/OCI-Integration_3690011872/Delete-tenancy-config-returns-Not-Found-response_1993953303/frozen.json b/cassettes/v2/OCI-Integration_3690011872/Delete-tenancy-config-returns-Not-Found-response_1993953303/frozen.json new file mode 100644 index 000000000000..cf7bb0b30f17 --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Delete-tenancy-config-returns-Not-Found-response_1993953303/frozen.json @@ -0,0 +1 @@ +"2025-05-07T20:00:06.642Z" diff --git a/cassettes/v2/OCI-Integration_3690011872/Delete-tenancy-config-returns-Not-Found-response_1993953303/recording.har b/cassettes/v2/OCI-Integration_3690011872/Delete-tenancy-config-returns-Not-Found-response_1993953303/recording.har new file mode 100644 index 000000000000..2551ac885484 --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Delete-tenancy-config-returns-Not-Found-response_1993953303/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "OCI Integration/Delete tenancy config returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "4b5381f6099e1c3e87561dc8469f2cd4", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 533, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies/ocid1.tenancy.fake" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"tenancy not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 668, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-05-07T20:00:06.645Z", + "time": 150 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-config-returns-Not-Found-response_3312022242/frozen.json b/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-config-returns-Not-Found-response_3312022242/frozen.json new file mode 100644 index 000000000000..4d7e9343582c --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-config-returns-Not-Found-response_3312022242/frozen.json @@ -0,0 +1 @@ +"2025-05-07T20:00:07.060Z" diff --git a/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-config-returns-Not-Found-response_3312022242/recording.har b/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-config-returns-Not-Found-response_3312022242/recording.har new file mode 100644 index 000000000000..661783d7bfee --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-config-returns-Not-Found-response_3312022242/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "OCI Integration/Get tenancy config returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "83086f924561f7a648e01ab454bec292", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 541, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies/ocid1.tenancy.fake" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"tenancy not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 671, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-05-07T20:00:07.078Z", + "time": 173 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-config-returns-OK-response_242331701/frozen.json b/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-config-returns-OK-response_242331701/frozen.json new file mode 100644 index 000000000000..4887f3436886 --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-config-returns-OK-response_242331701/frozen.json @@ -0,0 +1 @@ +"2025-05-07T20:00:07.257Z" diff --git a/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-config-returns-OK-response_242331701/recording.har b/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-config-returns-OK-response_242331701/recording.har new file mode 100644 index 000000000000..d39071d9f213 --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-config-returns-OK-response_242331701/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "OCI Integration/Get tenancy config returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "77430fbdd56edaf8041c701da397c8c3", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 2271, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 580, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"auth_credentials\":{\"fingerprint\":\"c8:e5:54:f2:da:a2:d7:b0:ed:f4:79:47:93:64:12:b1\",\"private_key\":\"-----BEGIN PRIVATE KEY-----\\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCmMo2jwJXWTt0y\\nk+X6biZycflZSwOAP/iNeAZPTWwhYxj9pxDvd5OfiIe+o/7eupk/3q+fRsSaztPn\\nJwI/JnbQz5IT5miLi/apIozg870FFxjrgRxSGjo7BNH0dLKITc5nLDLBnOEzxR2Y\\nk9+0dFaiNlcodFULlg75trqbILRSc6jn9Tp9G8C5e9cj+LYQuUu2JwIqhCJqcNcU\\nt+lRL5odBJhZ85KlugKyUg6LN3VQIdOpTtPBMXYA1oBgDCbe5Rw5yzgnd0KtSFf3\\nGOmLfR95gQshLfbGavLOTh9ioaOj/2hT9HrsEe1VWgX3m1WibqKiPc4OA4BGGToN\\n9tzN/t89AgMBAAECggEAVFKD4JherXwX6Ih3f6cRZLGFBJP1s8VBM225LdUnTo07\\n6b4w7n6p7KBV1xjXwGPGS0yNqG88YxsbEkWNc0Ltt6YJBIW7d0nNHSVFewDPX1zH\\nrP01xEZAUx9v8uqehl+LoHchTXBuJlkVWgt0zdbU+bo+YG0dlSJOeM4IQZrHQqlQ\\ne4PNk73rot9NSqiKQFXUroaoVPTkUHb3idpLX60K3MgIBoAm4DpJ6cMItb4hyHv5\\npNZhHQbr9Eciz2tj+OhQTYKCrAd0gJgl0tC+6L3kzkmiYE3ceGphqWfI9bX52Y96\\nwpgAtYi6o8wTykgRLabLc6vSQ9RegWEh7P8iSAvAlQKBgQDX5wJhYeWDdG4uPqLC\\nX3EtnR3y5zYgOd7cVtMr1DIvXa4I8PSIOC4Wnb/5A1S03dJ2e8GJ/qSbl5R2fsDr\\nXhjIm/KeBPI9p2dVZM8fPoWppR3SgDaHY5qxAED111DnEZuTMl5BO87QZXurTSiF\\nfbGsWaVqdVieRAQ3b5DEkC9TSwKBgQDFEFgui7iyPhQaQafsjnVbWyrWF821xjTG\\nb6Bo4FO97c9pw/tbkpfM+dcOU4SsZL8HjwGBUhUsDsVOX7m/sWRjZqNM5t/VR+52\\n9ygIPEjNyh0b3aARgn8AQ8n+RZvl1Z2A32KCO3MFzhpVKnv2sdSc1TNHQkuJH/rq\\neUAm3El6lwKBgQCK8w+jIOAXRB2NAZ66PbaXRqD5rTg2cUguwmpRsNVDiqTw+DJI\\nYO+4enoMhspDROeofWlHqGzD/j/8KwN59ys4ILV6YXCNoWltmd17HD/luHCDAyUU\\n6VOrSqCEF7jnnXtktmvWy+kEUevPiW7kyspIQ8GjzDXmVZvpGZIwDyOGFQKBgGtS\\nl3PiDFimjnQuRbIDc86pPA8VL6dLpvpbWNVFNtY9abSEU6RvldTATGs0+RCaXZ9U\\nNtGjTnyMHtCsOZE4nx+zikQbiNOzNR/9QwQZMN1Csc+3R7HBjEEsqhmc92aYjArf\\nndqnXeFPee/gD1svRkeTpTWt2U146UJBfrqrRilJAoGAQp7FtEtps5I9xK92AVpD\\nHj2p1JNKzLCRtWQ8j4jthKqR0iTQ9SwQyjiAvcKc7HdMaG11gmr5XbmKAzelVC+f\\no9kEwoumo8yHVn5Ztp4F2cxaD6+MzSJ/I6WesPyePUD7sPeorXByg1UNOXyzqDub\\n/aU4/sNo2f8epM9l7QGiCtY=\\n-----END PRIVATE KEY-----\\n\"},\"config_version\":2,\"home_region\":\"us-ashburn-1\",\"logs_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":true,\"enabled_services\":[\"oci_compute\"]},\"metrics_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":true,\"excluded_services\":[\"oacnativeproduction\"]},\"resource_collection_enabled\":true,\"user_ocid\":\"ocid1.user.test\"},\"id\":\"ocid1.tenancy.test\",\"type\":\"oci_tenancy\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies" + }, + "response": { + "bodySize": 131, + "content": { + "mimeType": "application/vnd.api+json", + "size": 131, + "text": "{\"data\":{\"id\":\"ocid1.tenancy.test\",\"type\":\"oci_tenancy\",\"attributes\":{\"home_region\":\"us-ashburn-1\",\"user_ocid\":\"ocid1.user.test\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 668, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2025-05-07T20:00:07.261Z", + "time": 207 + }, + { + "_id": "22330fb3d641a1d0a2b7dc75e35bdb4d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 541, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies/ocid1.tenancy.test" + }, + "response": { + "bodySize": 469, + "content": { + "mimeType": "application/vnd.api+json", + "size": 469, + "text": "{\"data\":{\"id\":\"ocid1.tenancy.test\",\"type\":\"oci_tenancy\",\"attributes\":{\"config_version\":2,\"cost_collection_enabled\":false,\"home_region\":\"us-ashburn-1\",\"logs_config\":{\"enabled\":true,\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled_services\":[\"oci_compute\"]},\"metrics_config\":{\"enabled\":true,\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"excluded_services\":[\"oacnativeproduction\"]},\"resource_collection_enabled\":true,\"user_ocid\":\"ocid1.user.test\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 672, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-05-07T20:00:07.472Z", + "time": 171 + }, + { + "_id": "86db074bb9f74cfc6ca3911ddad7bbd1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 533, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies/ocid1.tenancy.test" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 607, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-05-07T20:00:07.647Z", + "time": 192 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-configs-returns-OK-response_1900329318/frozen.json b/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-configs-returns-OK-response_1900329318/frozen.json new file mode 100644 index 000000000000..ac1f630fffb0 --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-configs-returns-OK-response_1900329318/frozen.json @@ -0,0 +1 @@ +"2025-05-07T20:00:07.843Z" diff --git a/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-configs-returns-OK-response_1900329318/recording.har b/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-configs-returns-OK-response_1900329318/recording.har new file mode 100644 index 000000000000..9720bc2c18e8 --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Get-tenancy-configs-returns-OK-response_1900329318/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "OCI Integration/Get tenancy configs returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "77430fbdd56edaf8041c701da397c8c3", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 2271, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 580, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"auth_credentials\":{\"fingerprint\":\"c8:e5:54:f2:da:a2:d7:b0:ed:f4:79:47:93:64:12:b1\",\"private_key\":\"-----BEGIN PRIVATE KEY-----\\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCmMo2jwJXWTt0y\\nk+X6biZycflZSwOAP/iNeAZPTWwhYxj9pxDvd5OfiIe+o/7eupk/3q+fRsSaztPn\\nJwI/JnbQz5IT5miLi/apIozg870FFxjrgRxSGjo7BNH0dLKITc5nLDLBnOEzxR2Y\\nk9+0dFaiNlcodFULlg75trqbILRSc6jn9Tp9G8C5e9cj+LYQuUu2JwIqhCJqcNcU\\nt+lRL5odBJhZ85KlugKyUg6LN3VQIdOpTtPBMXYA1oBgDCbe5Rw5yzgnd0KtSFf3\\nGOmLfR95gQshLfbGavLOTh9ioaOj/2hT9HrsEe1VWgX3m1WibqKiPc4OA4BGGToN\\n9tzN/t89AgMBAAECggEAVFKD4JherXwX6Ih3f6cRZLGFBJP1s8VBM225LdUnTo07\\n6b4w7n6p7KBV1xjXwGPGS0yNqG88YxsbEkWNc0Ltt6YJBIW7d0nNHSVFewDPX1zH\\nrP01xEZAUx9v8uqehl+LoHchTXBuJlkVWgt0zdbU+bo+YG0dlSJOeM4IQZrHQqlQ\\ne4PNk73rot9NSqiKQFXUroaoVPTkUHb3idpLX60K3MgIBoAm4DpJ6cMItb4hyHv5\\npNZhHQbr9Eciz2tj+OhQTYKCrAd0gJgl0tC+6L3kzkmiYE3ceGphqWfI9bX52Y96\\nwpgAtYi6o8wTykgRLabLc6vSQ9RegWEh7P8iSAvAlQKBgQDX5wJhYeWDdG4uPqLC\\nX3EtnR3y5zYgOd7cVtMr1DIvXa4I8PSIOC4Wnb/5A1S03dJ2e8GJ/qSbl5R2fsDr\\nXhjIm/KeBPI9p2dVZM8fPoWppR3SgDaHY5qxAED111DnEZuTMl5BO87QZXurTSiF\\nfbGsWaVqdVieRAQ3b5DEkC9TSwKBgQDFEFgui7iyPhQaQafsjnVbWyrWF821xjTG\\nb6Bo4FO97c9pw/tbkpfM+dcOU4SsZL8HjwGBUhUsDsVOX7m/sWRjZqNM5t/VR+52\\n9ygIPEjNyh0b3aARgn8AQ8n+RZvl1Z2A32KCO3MFzhpVKnv2sdSc1TNHQkuJH/rq\\neUAm3El6lwKBgQCK8w+jIOAXRB2NAZ66PbaXRqD5rTg2cUguwmpRsNVDiqTw+DJI\\nYO+4enoMhspDROeofWlHqGzD/j/8KwN59ys4ILV6YXCNoWltmd17HD/luHCDAyUU\\n6VOrSqCEF7jnnXtktmvWy+kEUevPiW7kyspIQ8GjzDXmVZvpGZIwDyOGFQKBgGtS\\nl3PiDFimjnQuRbIDc86pPA8VL6dLpvpbWNVFNtY9abSEU6RvldTATGs0+RCaXZ9U\\nNtGjTnyMHtCsOZE4nx+zikQbiNOzNR/9QwQZMN1Csc+3R7HBjEEsqhmc92aYjArf\\nndqnXeFPee/gD1svRkeTpTWt2U146UJBfrqrRilJAoGAQp7FtEtps5I9xK92AVpD\\nHj2p1JNKzLCRtWQ8j4jthKqR0iTQ9SwQyjiAvcKc7HdMaG11gmr5XbmKAzelVC+f\\no9kEwoumo8yHVn5Ztp4F2cxaD6+MzSJ/I6WesPyePUD7sPeorXByg1UNOXyzqDub\\n/aU4/sNo2f8epM9l7QGiCtY=\\n-----END PRIVATE KEY-----\\n\"},\"config_version\":2,\"home_region\":\"us-ashburn-1\",\"logs_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":true,\"enabled_services\":[\"oci_compute\"]},\"metrics_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":true,\"excluded_services\":[\"oacnativeproduction\"]},\"resource_collection_enabled\":true,\"user_ocid\":\"ocid1.user.test\"},\"id\":\"ocid1.tenancy.test\",\"type\":\"oci_tenancy\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies" + }, + "response": { + "bodySize": 131, + "content": { + "mimeType": "application/vnd.api+json", + "size": 131, + "text": "{\"data\":{\"id\":\"ocid1.tenancy.test\",\"type\":\"oci_tenancy\",\"attributes\":{\"home_region\":\"us-ashburn-1\",\"user_ocid\":\"ocid1.user.test\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 668, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2025-05-07T20:00:07.846Z", + "time": 165 + }, + { + "_id": "d9c02b07d980df38fe39b25b3200ed6c", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies" + }, + "response": { + "bodySize": 471, + "content": { + "mimeType": "application/vnd.api+json", + "size": 471, + "text": "{\"data\":[{\"id\":\"ocid1.tenancy.test\",\"type\":\"oci_tenancy\",\"attributes\":{\"config_version\":2,\"cost_collection_enabled\":false,\"home_region\":\"us-ashburn-1\",\"logs_config\":{\"enabled\":true,\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled_services\":[\"oci_compute\"]},\"metrics_config\":{\"enabled\":true,\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"excluded_services\":[\"oacnativeproduction\"]},\"resource_collection_enabled\":true,\"user_ocid\":\"ocid1.user.test\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 672, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-05-07T20:00:08.017Z", + "time": 179 + }, + { + "_id": "86db074bb9f74cfc6ca3911ddad7bbd1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 533, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies/ocid1.tenancy.test" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 607, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-05-07T20:00:08.200Z", + "time": 197 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-Bad-Request-response_1998385874/frozen.json b/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-Bad-Request-response_1998385874/frozen.json new file mode 100644 index 000000000000..5d248c9eaa36 --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-Bad-Request-response_1998385874/frozen.json @@ -0,0 +1 @@ +"2025-05-07T20:00:08.400Z" diff --git a/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-Bad-Request-response_1998385874/recording.har b/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-Bad-Request-response_1998385874/recording.har new file mode 100644 index 000000000000..ab54e2abfe39 --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-Bad-Request-response_1998385874/recording.har @@ -0,0 +1,157 @@ +{ + "log": { + "_recordingName": "OCI Integration/Update tenancy config returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "77430fbdd56edaf8041c701da397c8c3", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 2271, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 580, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"auth_credentials\":{\"fingerprint\":\"c8:e5:54:f2:da:a2:d7:b0:ed:f4:79:47:93:64:12:b1\",\"private_key\":\"-----BEGIN PRIVATE KEY-----\\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCmMo2jwJXWTt0y\\nk+X6biZycflZSwOAP/iNeAZPTWwhYxj9pxDvd5OfiIe+o/7eupk/3q+fRsSaztPn\\nJwI/JnbQz5IT5miLi/apIozg870FFxjrgRxSGjo7BNH0dLKITc5nLDLBnOEzxR2Y\\nk9+0dFaiNlcodFULlg75trqbILRSc6jn9Tp9G8C5e9cj+LYQuUu2JwIqhCJqcNcU\\nt+lRL5odBJhZ85KlugKyUg6LN3VQIdOpTtPBMXYA1oBgDCbe5Rw5yzgnd0KtSFf3\\nGOmLfR95gQshLfbGavLOTh9ioaOj/2hT9HrsEe1VWgX3m1WibqKiPc4OA4BGGToN\\n9tzN/t89AgMBAAECggEAVFKD4JherXwX6Ih3f6cRZLGFBJP1s8VBM225LdUnTo07\\n6b4w7n6p7KBV1xjXwGPGS0yNqG88YxsbEkWNc0Ltt6YJBIW7d0nNHSVFewDPX1zH\\nrP01xEZAUx9v8uqehl+LoHchTXBuJlkVWgt0zdbU+bo+YG0dlSJOeM4IQZrHQqlQ\\ne4PNk73rot9NSqiKQFXUroaoVPTkUHb3idpLX60K3MgIBoAm4DpJ6cMItb4hyHv5\\npNZhHQbr9Eciz2tj+OhQTYKCrAd0gJgl0tC+6L3kzkmiYE3ceGphqWfI9bX52Y96\\nwpgAtYi6o8wTykgRLabLc6vSQ9RegWEh7P8iSAvAlQKBgQDX5wJhYeWDdG4uPqLC\\nX3EtnR3y5zYgOd7cVtMr1DIvXa4I8PSIOC4Wnb/5A1S03dJ2e8GJ/qSbl5R2fsDr\\nXhjIm/KeBPI9p2dVZM8fPoWppR3SgDaHY5qxAED111DnEZuTMl5BO87QZXurTSiF\\nfbGsWaVqdVieRAQ3b5DEkC9TSwKBgQDFEFgui7iyPhQaQafsjnVbWyrWF821xjTG\\nb6Bo4FO97c9pw/tbkpfM+dcOU4SsZL8HjwGBUhUsDsVOX7m/sWRjZqNM5t/VR+52\\n9ygIPEjNyh0b3aARgn8AQ8n+RZvl1Z2A32KCO3MFzhpVKnv2sdSc1TNHQkuJH/rq\\neUAm3El6lwKBgQCK8w+jIOAXRB2NAZ66PbaXRqD5rTg2cUguwmpRsNVDiqTw+DJI\\nYO+4enoMhspDROeofWlHqGzD/j/8KwN59ys4ILV6YXCNoWltmd17HD/luHCDAyUU\\n6VOrSqCEF7jnnXtktmvWy+kEUevPiW7kyspIQ8GjzDXmVZvpGZIwDyOGFQKBgGtS\\nl3PiDFimjnQuRbIDc86pPA8VL6dLpvpbWNVFNtY9abSEU6RvldTATGs0+RCaXZ9U\\nNtGjTnyMHtCsOZE4nx+zikQbiNOzNR/9QwQZMN1Csc+3R7HBjEEsqhmc92aYjArf\\nndqnXeFPee/gD1svRkeTpTWt2U146UJBfrqrRilJAoGAQp7FtEtps5I9xK92AVpD\\nHj2p1JNKzLCRtWQ8j4jthKqR0iTQ9SwQyjiAvcKc7HdMaG11gmr5XbmKAzelVC+f\\no9kEwoumo8yHVn5Ztp4F2cxaD6+MzSJ/I6WesPyePUD7sPeorXByg1UNOXyzqDub\\n/aU4/sNo2f8epM9l7QGiCtY=\\n-----END PRIVATE KEY-----\\n\"},\"config_version\":2,\"home_region\":\"us-ashburn-1\",\"logs_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":true,\"enabled_services\":[\"oci_compute\"]},\"metrics_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":true,\"excluded_services\":[\"oacnativeproduction\"]},\"resource_collection_enabled\":true,\"user_ocid\":\"ocid1.user.test\"},\"id\":\"ocid1.tenancy.test\",\"type\":\"oci_tenancy\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies" + }, + "response": { + "bodySize": 131, + "content": { + "mimeType": "application/vnd.api+json", + "size": 131, + "text": "{\"data\":{\"id\":\"ocid1.tenancy.test\",\"type\":\"oci_tenancy\",\"attributes\":{\"home_region\":\"us-ashburn-1\",\"user_ocid\":\"ocid1.user.test\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 668, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2025-05-07T20:00:08.403Z", + "time": 198 + }, + { + "_id": "df203740a18fe3d652f23cb20d1bb1b8", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 413, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 599, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"home_region\":\"us-ashburn-1\",\"logs_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":true,\"enabled_services\":[\"objectstorage\"]},\"metrics_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":true,\"excluded_services\":[\"oci_compute\"]},\"resource_collection_enabled\":true,\"user_ocid\":\"user.test\"},\"id\":\"ocid1.tenancy.dummy_value\",\"type\":\"oci_tenancy\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies/ocid1.tenancy.test" + }, + "response": { + "bodySize": 115, + "content": { + "mimeType": "application/vnd.api+json", + "size": 115, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"attribute \\\"user_ocid\\\" failed startswith validation\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 668, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-05-07T20:00:08.606Z", + "time": 159 + }, + { + "_id": "86db074bb9f74cfc6ca3911ddad7bbd1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 534, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies/ocid1.tenancy.test" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 607, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-05-07T20:00:08.770Z", + "time": 229 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-Not-Found-response_4110866433/frozen.json b/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-Not-Found-response_4110866433/frozen.json new file mode 100644 index 000000000000..72a3da4e7d46 --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-Not-Found-response_4110866433/frozen.json @@ -0,0 +1 @@ +"2025-05-07T20:00:09.002Z" diff --git a/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-Not-Found-response_4110866433/recording.har b/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-Not-Found-response_4110866433/recording.har new file mode 100644 index 000000000000..0fd9856a0360 --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-Not-Found-response_4110866433/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "OCI Integration/Update tenancy config returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "1bea1d3d15408464f288981e0328f2a7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 412, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 597, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"home_region\":\"us-ashburn-1\",\"logs_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":true,\"enabled_services\":[\"objectstorage\"]},\"metrics_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":true,\"excluded_services\":[\"oci_compute\"]},\"resource_collection_enabled\":true,\"user_ocid\":\"ocid1.user.test\"},\"id\":\"ocid1.tenancy.fake\",\"type\":\"oci_tenancy\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies/ocid1.tenancy.fake" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"tenancy not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 667, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-05-07T20:00:09.004Z", + "time": 346 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-OK-response_4283832400/frozen.json b/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-OK-response_4283832400/frozen.json new file mode 100644 index 000000000000..70bdb5fc7c8d --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-OK-response_4283832400/frozen.json @@ -0,0 +1 @@ +"2025-05-07T20:23:20.166Z" diff --git a/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-OK-response_4283832400/recording.har b/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-OK-response_4283832400/recording.har new file mode 100644 index 000000000000..6cba6e3d4e6d --- /dev/null +++ b/cassettes/v2/OCI-Integration_3690011872/Update-tenancy-config-returns-OK-response_4283832400/recording.har @@ -0,0 +1,157 @@ +{ + "log": { + "_recordingName": "OCI Integration/Update tenancy config returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "77430fbdd56edaf8041c701da397c8c3", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 2271, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 580, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"auth_credentials\":{\"fingerprint\":\"c8:e5:54:f2:da:a2:d7:b0:ed:f4:79:47:93:64:12:b1\",\"private_key\":\"-----BEGIN PRIVATE KEY-----\\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCmMo2jwJXWTt0y\\nk+X6biZycflZSwOAP/iNeAZPTWwhYxj9pxDvd5OfiIe+o/7eupk/3q+fRsSaztPn\\nJwI/JnbQz5IT5miLi/apIozg870FFxjrgRxSGjo7BNH0dLKITc5nLDLBnOEzxR2Y\\nk9+0dFaiNlcodFULlg75trqbILRSc6jn9Tp9G8C5e9cj+LYQuUu2JwIqhCJqcNcU\\nt+lRL5odBJhZ85KlugKyUg6LN3VQIdOpTtPBMXYA1oBgDCbe5Rw5yzgnd0KtSFf3\\nGOmLfR95gQshLfbGavLOTh9ioaOj/2hT9HrsEe1VWgX3m1WibqKiPc4OA4BGGToN\\n9tzN/t89AgMBAAECggEAVFKD4JherXwX6Ih3f6cRZLGFBJP1s8VBM225LdUnTo07\\n6b4w7n6p7KBV1xjXwGPGS0yNqG88YxsbEkWNc0Ltt6YJBIW7d0nNHSVFewDPX1zH\\nrP01xEZAUx9v8uqehl+LoHchTXBuJlkVWgt0zdbU+bo+YG0dlSJOeM4IQZrHQqlQ\\ne4PNk73rot9NSqiKQFXUroaoVPTkUHb3idpLX60K3MgIBoAm4DpJ6cMItb4hyHv5\\npNZhHQbr9Eciz2tj+OhQTYKCrAd0gJgl0tC+6L3kzkmiYE3ceGphqWfI9bX52Y96\\nwpgAtYi6o8wTykgRLabLc6vSQ9RegWEh7P8iSAvAlQKBgQDX5wJhYeWDdG4uPqLC\\nX3EtnR3y5zYgOd7cVtMr1DIvXa4I8PSIOC4Wnb/5A1S03dJ2e8GJ/qSbl5R2fsDr\\nXhjIm/KeBPI9p2dVZM8fPoWppR3SgDaHY5qxAED111DnEZuTMl5BO87QZXurTSiF\\nfbGsWaVqdVieRAQ3b5DEkC9TSwKBgQDFEFgui7iyPhQaQafsjnVbWyrWF821xjTG\\nb6Bo4FO97c9pw/tbkpfM+dcOU4SsZL8HjwGBUhUsDsVOX7m/sWRjZqNM5t/VR+52\\n9ygIPEjNyh0b3aARgn8AQ8n+RZvl1Z2A32KCO3MFzhpVKnv2sdSc1TNHQkuJH/rq\\neUAm3El6lwKBgQCK8w+jIOAXRB2NAZ66PbaXRqD5rTg2cUguwmpRsNVDiqTw+DJI\\nYO+4enoMhspDROeofWlHqGzD/j/8KwN59ys4ILV6YXCNoWltmd17HD/luHCDAyUU\\n6VOrSqCEF7jnnXtktmvWy+kEUevPiW7kyspIQ8GjzDXmVZvpGZIwDyOGFQKBgGtS\\nl3PiDFimjnQuRbIDc86pPA8VL6dLpvpbWNVFNtY9abSEU6RvldTATGs0+RCaXZ9U\\nNtGjTnyMHtCsOZE4nx+zikQbiNOzNR/9QwQZMN1Csc+3R7HBjEEsqhmc92aYjArf\\nndqnXeFPee/gD1svRkeTpTWt2U146UJBfrqrRilJAoGAQp7FtEtps5I9xK92AVpD\\nHj2p1JNKzLCRtWQ8j4jthKqR0iTQ9SwQyjiAvcKc7HdMaG11gmr5XbmKAzelVC+f\\no9kEwoumo8yHVn5Ztp4F2cxaD6+MzSJ/I6WesPyePUD7sPeorXByg1UNOXyzqDub\\n/aU4/sNo2f8epM9l7QGiCtY=\\n-----END PRIVATE KEY-----\\n\"},\"config_version\":2,\"home_region\":\"us-ashburn-1\",\"logs_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":true,\"enabled_services\":[\"oci_compute\"]},\"metrics_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":true,\"excluded_services\":[\"oacnativeproduction\"]},\"resource_collection_enabled\":true,\"user_ocid\":\"ocid1.user.test\"},\"id\":\"ocid1.tenancy.test\",\"type\":\"oci_tenancy\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies" + }, + "response": { + "bodySize": 131, + "content": { + "mimeType": "application/vnd.api+json", + "size": 131, + "text": "{\"data\":{\"id\":\"ocid1.tenancy.test\",\"type\":\"oci_tenancy\",\"attributes\":{\"home_region\":\"us-ashburn-1\",\"user_ocid\":\"ocid1.user.test\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 670, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2025-05-07T20:23:20.170Z", + "time": 150 + }, + { + "_id": "6bf3dab3f049fe613ff306386f5c5585", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 287, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 599, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"home_region\":\"us-sanjose-1\",\"metrics_config\":{\"compartment_tag_filters\":[\"datadog:true\",\"env:prod\"],\"enabled\":false,\"excluded_services\":[]},\"resource_collection_enabled\":false,\"user_ocid\":\"ocid1.user.test_updated\"},\"id\":\"ocid1.tenancy.test\",\"type\":\"oci_tenancy\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies/ocid1.tenancy.test" + }, + "response": { + "bodySize": 139, + "content": { + "mimeType": "application/vnd.api+json", + "size": 139, + "text": "{\"data\":{\"id\":\"ocid1.tenancy.test\",\"type\":\"oci_tenancy\",\"attributes\":{\"home_region\":\"us-sanjose-1\",\"user_ocid\":\"ocid1.user.test_updated\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 670, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-05-07T20:23:20.329Z", + "time": 148 + }, + { + "_id": "86db074bb9f74cfc6ca3911ddad7bbd1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 534, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/oci/tenancies/ocid1.tenancy.test" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 609, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-05-07T20:23:20.483Z", + "time": 128 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/oci-integration/CreateTenancyConfig.ts b/examples/v2/oci-integration/CreateTenancyConfig.ts new file mode 100644 index 000000000000..34c79c33ad7d --- /dev/null +++ b/examples/v2/oci-integration/CreateTenancyConfig.ts @@ -0,0 +1,47 @@ +/** + * Create tenancy config returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.OCIIntegrationApi(configuration); + +const params: v2.OCIIntegrationApiCreateTenancyConfigRequest = { + body: { + data: { + attributes: { + authCredentials: { + fingerprint: "a7:b5:54:f2:da:a2:d7:b0:ed:f4:79:47:93:64:12:b1", + privateKey: + "-----BEGIN PRIVATE KEY-----\no9kEwoumo8yHVn5Ztp4F2cxaD6+MzSJ/I6WesPyePUD7sPeorXByg1UNOXyzqDub\n/aU4/sNo2f8epM9l7QGiCtY=\n-----END PRIVATE KEY-----", + }, + configVersion: 2, + homeRegion: "us-ashburn-1", + logsConfig: { + compartmentTagFilters: ["datadog:true", "env:prod"], + enabled: true, + enabledServices: ["oacnativeproduction"], + }, + metricsConfig: { + compartmentTagFilters: ["datadog:true", "env:prod"], + enabled: true, + excludedServices: ["oci_compute"], + }, + resourceCollectionEnabled: true, + userOcid: "ocid1.user.test", + }, + id: "ocid1.tenancy.dummy_value", + type: "oci_tenancy", + }, + }, +}; + +apiInstance + .createTenancyConfig(params) + .then((data: v2.TenancyConfig) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/oci-integration/DeleteTenancyConfig.ts b/examples/v2/oci-integration/DeleteTenancyConfig.ts new file mode 100644 index 000000000000..ad1b5026f150 --- /dev/null +++ b/examples/v2/oci-integration/DeleteTenancyConfig.ts @@ -0,0 +1,24 @@ +/** + * Delete tenancy config returns "No Content" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.OCIIntegrationApi(configuration); + +// there is a valid "oci_tenancy" resource in the system +const OCI_TENANCY_DATA_ID = process.env.OCI_TENANCY_DATA_ID as string; + +const params: v2.OCIIntegrationApiDeleteTenancyConfigRequest = { + tenancyOcid: OCI_TENANCY_DATA_ID, +}; + +apiInstance + .deleteTenancyConfig(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/oci-integration/GetTenancyConfig.ts b/examples/v2/oci-integration/GetTenancyConfig.ts new file mode 100644 index 000000000000..bf80efb8f60a --- /dev/null +++ b/examples/v2/oci-integration/GetTenancyConfig.ts @@ -0,0 +1,24 @@ +/** + * Get tenancy config returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.OCIIntegrationApi(configuration); + +// there is a valid "oci_tenancy" resource in the system +const OCI_TENANCY_DATA_ID = process.env.OCI_TENANCY_DATA_ID as string; + +const params: v2.OCIIntegrationApiGetTenancyConfigRequest = { + tenancyOcid: OCI_TENANCY_DATA_ID, +}; + +apiInstance + .getTenancyConfig(params) + .then((data: v2.TenancyConfig) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/oci-integration/GetTenancyConfigs.ts b/examples/v2/oci-integration/GetTenancyConfigs.ts new file mode 100644 index 000000000000..0beb9135305f --- /dev/null +++ b/examples/v2/oci-integration/GetTenancyConfigs.ts @@ -0,0 +1,17 @@ +/** + * Get tenancy configs returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.OCIIntegrationApi(configuration); + +apiInstance + .getTenancyConfigs() + .then((data: v2.TenancyConfigList) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/oci-integration/UpdateTenancyConfig.ts b/examples/v2/oci-integration/UpdateTenancyConfig.ts new file mode 100644 index 000000000000..fd73fb05e379 --- /dev/null +++ b/examples/v2/oci-integration/UpdateTenancyConfig.ts @@ -0,0 +1,40 @@ +/** + * Update tenancy config returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.OCIIntegrationApi(configuration); + +// there is a valid "oci_tenancy" resource in the system +const OCI_TENANCY_DATA_ID = process.env.OCI_TENANCY_DATA_ID as string; + +const params: v2.OCIIntegrationApiUpdateTenancyConfigRequest = { + body: { + data: { + attributes: { + homeRegion: "us-sanjose-1", + metricsConfig: { + compartmentTagFilters: ["datadog:true", "env:prod"], + enabled: false, + excludedServices: [], + }, + resourceCollectionEnabled: false, + userOcid: "ocid1.user.test_updated", + }, + id: OCI_TENANCY_DATA_ID, + type: "oci_tenancy", + }, + }, + tenancyOcid: OCI_TENANCY_DATA_ID, +}; + +apiInstance + .updateTenancyConfig(params) + .then((data: v2.TenancyConfig) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index 4347960efa28..2e67bb85fede 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -4955,6 +4955,41 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "MicrosoftTeamsWorkflowsWebhookHandleResponse", }, + "v2.GetTenancyConfigs": { + "operationResponseType": "TenancyConfigList", + }, + "v2.CreateTenancyConfig": { + "body": { + "type": "CreateTenancyConfigRequest", + "format": "", + }, + "operationResponseType": "TenancyConfig", + }, + "v2.DeleteTenancyConfig": { + "tenancyOcid": { + "type": "string", + "format": "", + }, + "operationResponseType": "void", + }, + "v2.GetTenancyConfig": { + "tenancyOcid": { + "type": "string", + "format": "", + }, + "operationResponseType": "TenancyConfig", + }, + "v2.UpdateTenancyConfig": { + "tenancyOcid": { + "type": "string", + "format": "", + }, + "body": { + "type": "UpdateTenancyConfigRequest", + "format": "", + }, + "operationResponseType": "TenancyConfig", + }, "v2.ListOpsgenieServices": { "operationResponseType": "OpsgenieServicesResponse", }, diff --git a/features/v2/given.json b/features/v2/given.json index 696fef088cf8..7b381db87b25 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -312,6 +312,18 @@ "tag": "Microsoft Teams Integration", "operationId": "CreateWorkflowsWebhookHandle" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"auth_credentials\": {\n \"fingerprint\": \"c8:e5:54:f2:da:a2:d7:b0:ed:f4:79:47:93:64:12:b1\",\n \"private_key\": \"-----BEGIN PRIVATE KEY-----\\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCmMo2jwJXWTt0y\\nk+X6biZycflZSwOAP/iNeAZPTWwhYxj9pxDvd5OfiIe+o/7eupk/3q+fRsSaztPn\\nJwI/JnbQz5IT5miLi/apIozg870FFxjrgRxSGjo7BNH0dLKITc5nLDLBnOEzxR2Y\\nk9+0dFaiNlcodFULlg75trqbILRSc6jn9Tp9G8C5e9cj+LYQuUu2JwIqhCJqcNcU\\nt+lRL5odBJhZ85KlugKyUg6LN3VQIdOpTtPBMXYA1oBgDCbe5Rw5yzgnd0KtSFf3\\nGOmLfR95gQshLfbGavLOTh9ioaOj/2hT9HrsEe1VWgX3m1WibqKiPc4OA4BGGToN\\n9tzN/t89AgMBAAECggEAVFKD4JherXwX6Ih3f6cRZLGFBJP1s8VBM225LdUnTo07\\n6b4w7n6p7KBV1xjXwGPGS0yNqG88YxsbEkWNc0Ltt6YJBIW7d0nNHSVFewDPX1zH\\nrP01xEZAUx9v8uqehl+LoHchTXBuJlkVWgt0zdbU+bo+YG0dlSJOeM4IQZrHQqlQ\\ne4PNk73rot9NSqiKQFXUroaoVPTkUHb3idpLX60K3MgIBoAm4DpJ6cMItb4hyHv5\\npNZhHQbr9Eciz2tj+OhQTYKCrAd0gJgl0tC+6L3kzkmiYE3ceGphqWfI9bX52Y96\\nwpgAtYi6o8wTykgRLabLc6vSQ9RegWEh7P8iSAvAlQKBgQDX5wJhYeWDdG4uPqLC\\nX3EtnR3y5zYgOd7cVtMr1DIvXa4I8PSIOC4Wnb/5A1S03dJ2e8GJ/qSbl5R2fsDr\\nXhjIm/KeBPI9p2dVZM8fPoWppR3SgDaHY5qxAED111DnEZuTMl5BO87QZXurTSiF\\nfbGsWaVqdVieRAQ3b5DEkC9TSwKBgQDFEFgui7iyPhQaQafsjnVbWyrWF821xjTG\\nb6Bo4FO97c9pw/tbkpfM+dcOU4SsZL8HjwGBUhUsDsVOX7m/sWRjZqNM5t/VR+52\\n9ygIPEjNyh0b3aARgn8AQ8n+RZvl1Z2A32KCO3MFzhpVKnv2sdSc1TNHQkuJH/rq\\neUAm3El6lwKBgQCK8w+jIOAXRB2NAZ66PbaXRqD5rTg2cUguwmpRsNVDiqTw+DJI\\nYO+4enoMhspDROeofWlHqGzD/j/8KwN59ys4ILV6YXCNoWltmd17HD/luHCDAyUU\\n6VOrSqCEF7jnnXtktmvWy+kEUevPiW7kyspIQ8GjzDXmVZvpGZIwDyOGFQKBgGtS\\nl3PiDFimjnQuRbIDc86pPA8VL6dLpvpbWNVFNtY9abSEU6RvldTATGs0+RCaXZ9U\\nNtGjTnyMHtCsOZE4nx+zikQbiNOzNR/9QwQZMN1Csc+3R7HBjEEsqhmc92aYjArf\\nndqnXeFPee/gD1svRkeTpTWt2U146UJBfrqrRilJAoGAQp7FtEtps5I9xK92AVpD\\nHj2p1JNKzLCRtWQ8j4jthKqR0iTQ9SwQyjiAvcKc7HdMaG11gmr5XbmKAzelVC+f\\no9kEwoumo8yHVn5Ztp4F2cxaD6+MzSJ/I6WesPyePUD7sPeorXByg1UNOXyzqDub\\n/aU4/sNo2f8epM9l7QGiCtY=\\n-----END PRIVATE KEY-----\\n\"\n },\n \"config_version\": 2,\n \"home_region\": \"us-ashburn-1\",\n \"logs_config\": {\n \"compartment_tag_filters\": [\n \"datadog:true\",\n \"env:prod\"\n ],\n \"enabled\": true,\n \"enabled_services\": [\"oci_compute\"]\n },\n \"metrics_config\": {\n \"compartment_tag_filters\": [\n \"datadog:true\",\n \"env:prod\"\n ],\n \"enabled\": true,\n \"excluded_services\": [\"oacnativeproduction\"]\n },\n \"resource_collection_enabled\": true,\n \"user_ocid\": \"ocid1.user.test\"\n },\n \"id\": \"ocid1.tenancy.test\",\n \"type\": \"oci_tenancy\"\n }\n}\n" + } + ], + "step": "there is a valid \"oci_tenancy\" resource in the system", + "key": "oci_tenancy", + "tag": "OCI Integration", + "operationId": "CreateTenancyConfig" + }, { "parameters": [ { diff --git a/features/v2/oci_integration.feature b/features/v2/oci_integration.feature new file mode 100644 index 000000000000..bf35e71b8d5a --- /dev/null +++ b/features/v2/oci_integration.feature @@ -0,0 +1,99 @@ +@endpoint(oci-integration) @endpoint(oci-integration-v2) +Feature: OCI Integration + Configure your Datadog-OCI integration directly through the Datadog API. + For more information, see the [OCI integration page](https://docs.datadogh + q.com/integrations/oracle_cloud_infrastructure/). + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "OCIIntegration" API + + @team:DataDog/emerging-cloud-integrations + Scenario: Create tenancy config returns "Bad Request" response + Given new "CreateTenancyConfig" request + And body with value {"data": {"attributes": {"auth_credentials": {"fingerprint": "a7:b5:54:f2:da:a2:d7:b0:ed:f4:79:47:93:64:12:b1", "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEv\n-----END PRIVATE KEY-----\n"}, "config_version": 2, "home_region": "us-ashburn-1", "logs_config": {"compartment_tag_filters": ["datadog:true", "env:prod"], "enabled": true, "enabled_services": ["oacnativeproduction"]}, "metrics_config": {"compartment_tag_filters": ["datadog:true", "env:prod"], "enabled": true, "excluded_services": ["oci_compute"]}, "resource_collection_enabled": true, "user_ocid": "ocid1.user.test"}, "id": "ocid1.tenancy.dummy_value", "type": "oci_tenancy"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/emerging-cloud-integrations + Scenario: Create tenancy config returns "Conflict" response + Given new "CreateTenancyConfig" request + And body with value {"data": {"attributes": {"auth_credentials": {"fingerprint": "a7:b5:54:f2:da:a2:d7:b0:ed:f4:79:47:93:64:12:b1", "private_key": "-----BEGIN PRIVATE KEY-----\no9kEwoumo8yHVn5Ztp4F2cxaD6+MzSJ/I6WesPyePUD7sPeorXByg1UNOXyzqDub\n/aU4/sNo2f8epM9l7QGiCtY=\n-----END PRIVATE KEY-----"}, "config_version": 2, "home_region": "us-ashburn-1", "logs_config": {"compartment_tag_filters": ["datadog:true", "env:prod"], "enabled": true, "enabled_services": ["oacnativeproduction"]}, "metrics_config": {"compartment_tag_filters": ["datadog:true", "env:prod"], "enabled": true, "excluded_services": ["oci_compute"]}, "resource_collection_enabled": true, "user_ocid": "ocid1.user.test"}, "id": "ocid1.tenancy.dummy_value", "type": "oci_tenancy"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/emerging-cloud-integrations + Scenario: Create tenancy config returns "Created" response + Given new "CreateTenancyConfig" request + And body with value {"data": {"attributes": {"auth_credentials": {"fingerprint": "a7:b5:54:f2:da:a2:d7:b0:ed:f4:79:47:93:64:12:b1", "private_key": "-----BEGIN PRIVATE KEY-----\no9kEwoumo8yHVn5Ztp4F2cxaD6+MzSJ/I6WesPyePUD7sPeorXByg1UNOXyzqDub\n/aU4/sNo2f8epM9l7QGiCtY=\n-----END PRIVATE KEY-----"}, "config_version": 2, "home_region": "us-ashburn-1", "logs_config": {"compartment_tag_filters": ["datadog:true", "env:prod"], "enabled": true, "enabled_services": ["oacnativeproduction"]}, "metrics_config": {"compartment_tag_filters": ["datadog:true", "env:prod"], "enabled": true, "excluded_services": ["oci_compute"]}, "resource_collection_enabled": true, "user_ocid": "ocid1.user.test"}, "id": "ocid1.tenancy.dummy_value", "type": "oci_tenancy"}} + When the request is sent + Then the response status is 201 Created + + @team:DataDog/emerging-cloud-integrations + Scenario: Delete tenancy config returns "No Content" response + Given there is a valid "oci_tenancy" resource in the system + And new "DeleteTenancyConfig" request + And request contains "tenancy_ocid" parameter from "oci_tenancy.data.id" + When the request is sent + Then the response status is 204 No Content + + @team:DataDog/emerging-cloud-integrations + Scenario: Delete tenancy config returns "Not Found" response + Given new "DeleteTenancyConfig" request + And request contains "tenancy_ocid" parameter with value "ocid1.tenancy.fake" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/emerging-cloud-integrations + Scenario: Get tenancy config returns "Not Found" response + Given new "GetTenancyConfig" request + And request contains "tenancy_ocid" parameter with value "ocid1.tenancy.fake" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/emerging-cloud-integrations + Scenario: Get tenancy config returns "OK" response + Given there is a valid "oci_tenancy" resource in the system + And new "GetTenancyConfig" request + And request contains "tenancy_ocid" parameter from "oci_tenancy.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "{{oci_tenancy.data.id}}" + + @team:DataDog/emerging-cloud-integrations + Scenario: Get tenancy configs returns "OK" response + Given there is a valid "oci_tenancy" resource in the system + And new "GetTenancyConfigs" request + When the request is sent + Then the response status is 200 OK + And the response "data[0].id" is equal to "{{oci_tenancy.data.id}}" + + @team:DataDog/emerging-cloud-integrations + Scenario: Update tenancy config returns "Bad Request" response + Given there is a valid "oci_tenancy" resource in the system + And new "UpdateTenancyConfig" request + And request contains "tenancy_ocid" parameter from "oci_tenancy.data.id" + And body with value {"data": {"attributes": {"home_region": "us-ashburn-1", "logs_config": {"compartment_tag_filters": ["datadog:true", "env:prod"], "enabled": true, "enabled_services": ["objectstorage"]}, "metrics_config": {"compartment_tag_filters": ["datadog:true", "env:prod"], "enabled": true, "excluded_services": ["oci_compute"]}, "resource_collection_enabled": true, "user_ocid": "user.test"}, "id": "ocid1.tenancy.dummy_value", "type": "oci_tenancy"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/emerging-cloud-integrations + Scenario: Update tenancy config returns "Not Found" response + Given new "UpdateTenancyConfig" request + And request contains "tenancy_ocid" parameter with value "ocid1.tenancy.fake" + And body with value {"data": {"attributes": {"home_region": "us-ashburn-1", "logs_config": {"compartment_tag_filters": ["datadog:true", "env:prod"], "enabled": true, "enabled_services": ["objectstorage"]}, "metrics_config": {"compartment_tag_filters": ["datadog:true", "env:prod"], "enabled": true, "excluded_services": ["oci_compute"]}, "resource_collection_enabled": true, "user_ocid": "ocid1.user.test"}, "id": "ocid1.tenancy.fake", "type": "oci_tenancy"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/emerging-cloud-integrations + Scenario: Update tenancy config returns "OK" response + Given there is a valid "oci_tenancy" resource in the system + And new "UpdateTenancyConfig" request + And request contains "tenancy_ocid" parameter from "oci_tenancy.data.id" + And body with value {"data": {"attributes": {"home_region": "us-sanjose-1", "metrics_config": {"compartment_tag_filters": ["datadog:true", "env:prod"], "enabled": false, "excluded_services": []}, "resource_collection_enabled": false, "user_ocid": "ocid1.user.test_updated"}, "id": "{{oci_tenancy.data.id}}", "type": "oci_tenancy"}} + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "{{oci_tenancy.data.id}}" + And the response "data.attributes.user_ocid" is equal to "{{oci_tenancy.data.attributes.user_ocid}}_updated" + And the response "data.attributes.home_region" is equal to "us-sanjose-1" diff --git a/features/v2/undo.json b/features/v2/undo.json index 2b53228c62db..aa5587a15f4a 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1222,6 +1222,43 @@ "type": "idempotent" } }, + "GetTenancyConfigs": { + "tag": "OCI Integration", + "undo": { + "type": "safe" + } + }, + "CreateTenancyConfig": { + "tag": "OCI Integration", + "undo": { + "operationId": "DeleteTenancyConfig", + "parameters": [ + { + "name": "tenancy_ocid", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteTenancyConfig": { + "tag": "OCI Integration", + "undo": { + "type": "idempotent" + } + }, + "GetTenancyConfig": { + "tag": "OCI Integration", + "undo": { + "type": "safe" + } + }, + "UpdateTenancyConfig": { + "tag": "OCI Integration", + "undo": { + "type": "idempotent" + } + }, "ListOpsgenieServices": { "tag": "Opsgenie Integration", "undo": { diff --git a/packages/datadog-api-client-v2/apis/OCIIntegrationApi.ts b/packages/datadog-api-client-v2/apis/OCIIntegrationApi.ts new file mode 100644 index 000000000000..d09da7a3cbc7 --- /dev/null +++ b/packages/datadog-api-client-v2/apis/OCIIntegrationApi.ts @@ -0,0 +1,669 @@ +import { + BaseAPIRequestFactory, + RequiredError, +} from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { CreateTenancyConfigRequest } from "../models/CreateTenancyConfigRequest"; +import { TenancyConfig } from "../models/TenancyConfig"; +import { TenancyConfigList } from "../models/TenancyConfigList"; +import { UpdateTenancyConfigRequest } from "../models/UpdateTenancyConfigRequest"; + +export class OCIIntegrationApiRequestFactory extends BaseAPIRequestFactory { + public async createTenancyConfig( + body: CreateTenancyConfigRequest, + _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("body", "createTenancyConfig"); + } + + // Path Params + const localVarPath = "/api/v2/integration/oci/tenancies"; + + // Make Request Context + const requestContext = _config + .getServer("v2.OCIIntegrationApi.createTenancyConfig") + .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, "CreateTenancyConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteTenancyConfig( + tenancyOcid: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'tenancyOcid' is not null or undefined + if (tenancyOcid === null || tenancyOcid === undefined) { + throw new RequiredError("tenancyOcid", "deleteTenancyConfig"); + } + + // Path Params + const localVarPath = + "/api/v2/integration/oci/tenancies/{tenancy_ocid}".replace( + "{tenancy_ocid}", + encodeURIComponent(String(tenancyOcid)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.OCIIntegrationApi.deleteTenancyConfig") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getTenancyConfig( + tenancyOcid: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'tenancyOcid' is not null or undefined + if (tenancyOcid === null || tenancyOcid === undefined) { + throw new RequiredError("tenancyOcid", "getTenancyConfig"); + } + + // Path Params + const localVarPath = + "/api/v2/integration/oci/tenancies/{tenancy_ocid}".replace( + "{tenancy_ocid}", + encodeURIComponent(String(tenancyOcid)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.OCIIntegrationApi.getTenancyConfig") + .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 getTenancyConfigs( + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // Path Params + const localVarPath = "/api/v2/integration/oci/tenancies"; + + // Make Request Context + const requestContext = _config + .getServer("v2.OCIIntegrationApi.getTenancyConfigs") + .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 updateTenancyConfig( + tenancyOcid: string, + body: UpdateTenancyConfigRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'tenancyOcid' is not null or undefined + if (tenancyOcid === null || tenancyOcid === undefined) { + throw new RequiredError("tenancyOcid", "updateTenancyConfig"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateTenancyConfig"); + } + + // Path Params + const localVarPath = + "/api/v2/integration/oci/tenancies/{tenancy_ocid}".replace( + "{tenancy_ocid}", + encodeURIComponent(String(tenancyOcid)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.OCIIntegrationApi.updateTenancyConfig") + .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, "UpdateTenancyConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class OCIIntegrationApiResponseProcessor { + /** + * 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 createTenancyConfig + * @throws ApiException if the response code was not in [200, 299] + */ + public async createTenancyConfig( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: TenancyConfig = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TenancyConfig" + ) as TenancyConfig; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 409 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: TenancyConfig = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TenancyConfig", + "" + ) as TenancyConfig; + 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 deleteTenancyConfig + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteTenancyConfig(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", + "" + ) as void; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getTenancyConfig + * @throws ApiException if the response code was not in [200, 299] + */ + public async getTenancyConfig( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: TenancyConfig = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TenancyConfig" + ) as TenancyConfig; + return body; + } + if ( + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: TenancyConfig = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TenancyConfig", + "" + ) as TenancyConfig; + 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 getTenancyConfigs + * @throws ApiException if the response code was not in [200, 299] + */ + public async getTenancyConfigs( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: TenancyConfigList = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TenancyConfigList" + ) as TenancyConfigList; + return body; + } + if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: TenancyConfigList = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TenancyConfigList", + "" + ) as TenancyConfigList; + 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 updateTenancyConfig + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateTenancyConfig( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: TenancyConfig = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TenancyConfig" + ) as TenancyConfig; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: TenancyConfig = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TenancyConfig", + "" + ) as TenancyConfig; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface OCIIntegrationApiCreateTenancyConfigRequest { + /** + * @type CreateTenancyConfigRequest + */ + body: CreateTenancyConfigRequest; +} + +export interface OCIIntegrationApiDeleteTenancyConfigRequest { + /** + * Unique tenancy OCID of the OCI integration config. + * @type string + */ + tenancyOcid: string; +} + +export interface OCIIntegrationApiGetTenancyConfigRequest { + /** + * Unique tenancy OCID of the OCI integration config. + * @type string + */ + tenancyOcid: string; +} + +export interface OCIIntegrationApiUpdateTenancyConfigRequest { + /** + * Unique tenancy OCID of the OCI integration config. + * @type string + */ + tenancyOcid: string; + /** + * @type UpdateTenancyConfigRequest + */ + body: UpdateTenancyConfigRequest; +} + +export class OCIIntegrationApi { + private requestFactory: OCIIntegrationApiRequestFactory; + private responseProcessor: OCIIntegrationApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: OCIIntegrationApiRequestFactory, + responseProcessor?: OCIIntegrationApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || new OCIIntegrationApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new OCIIntegrationApiResponseProcessor(); + } + + /** + * Create a new tenancy config. + * @param param The request object + */ + public createTenancyConfig( + param: OCIIntegrationApiCreateTenancyConfigRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createTenancyConfig( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createTenancyConfig(responseContext); + }); + }); + } + + /** + * Delete an existing tenancy config. + * @param param The request object + */ + public deleteTenancyConfig( + param: OCIIntegrationApiDeleteTenancyConfigRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deleteTenancyConfig( + param.tenancyOcid, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteTenancyConfig(responseContext); + }); + }); + } + + /** + * Get a single tenancy config object. + * @param param The request object + */ + public getTenancyConfig( + param: OCIIntegrationApiGetTenancyConfigRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getTenancyConfig( + param.tenancyOcid, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getTenancyConfig(responseContext); + }); + }); + } + + /** + * List all tenancy integrations. + * @param param The request object + */ + public getTenancyConfigs( + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.getTenancyConfigs(options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getTenancyConfigs(responseContext); + }); + }); + } + + /** + * Update an existing tenancy config. + * @param param The request object + */ + public updateTenancyConfig( + param: OCIIntegrationApiUpdateTenancyConfigRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.updateTenancyConfig( + param.tenancyOcid, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateTenancyConfig(responseContext); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 6621105b1930..825b8f5c5c50 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -415,6 +415,14 @@ export { NetworkDeviceMonitoringApi, } from "./apis/NetworkDeviceMonitoringApi"; +export { + OCIIntegrationApiCreateTenancyConfigRequest, + OCIIntegrationApiDeleteTenancyConfigRequest, + OCIIntegrationApiGetTenancyConfigRequest, + OCIIntegrationApiUpdateTenancyConfigRequest, + OCIIntegrationApi, +} from "./apis/OCIIntegrationApi"; + export { ObservabilityPipelinesApiCreatePipelineRequest, ObservabilityPipelinesApiDeletePipelineRequest, @@ -856,6 +864,7 @@ export { AuditLogsResponseStatus } from "./models/AuditLogsResponseStatus"; export { AuditLogsSearchEventsRequest } from "./models/AuditLogsSearchEventsRequest"; export { AuditLogsSort } from "./models/AuditLogsSort"; export { AuditLogsWarning } from "./models/AuditLogsWarning"; +export { AuthCredentials } from "./models/AuthCredentials"; export { AuthNMapping } from "./models/AuthNMapping"; export { AuthNMappingAttributes } from "./models/AuthNMappingAttributes"; export { AuthNMappingCreateAttributes } from "./models/AuthNMappingCreateAttributes"; @@ -1260,6 +1269,10 @@ export { CreateRuleRequest } from "./models/CreateRuleRequest"; export { CreateRuleRequestData } from "./models/CreateRuleRequestData"; export { CreateRuleResponse } from "./models/CreateRuleResponse"; export { CreateRuleResponseData } from "./models/CreateRuleResponseData"; +export { CreateTenancyConfigData } from "./models/CreateTenancyConfigData"; +export { CreateTenancyConfigDataAttributes } from "./models/CreateTenancyConfigDataAttributes"; +export { CreateTenancyConfigDataType } from "./models/CreateTenancyConfigDataType"; +export { CreateTenancyConfigRequest } from "./models/CreateTenancyConfigRequest"; export { CreateWorkflowRequest } from "./models/CreateWorkflowRequest"; export { CreateWorkflowResponse } from "./models/CreateWorkflowResponse"; export { Creator } from "./models/Creator"; @@ -2322,6 +2335,8 @@ export { ObservabilityPipelineSyslogSourceMode } from "./models/ObservabilityPip export { ObservabilityPipelineThrottleProcessor } from "./models/ObservabilityPipelineThrottleProcessor"; export { ObservabilityPipelineThrottleProcessorType } from "./models/ObservabilityPipelineThrottleProcessorType"; export { ObservabilityPipelineTls } from "./models/ObservabilityPipelineTls"; +export { OCILogsConfig } from "./models/OCILogsConfig"; +export { OCIMetricsConfig } from "./models/OCIMetricsConfig"; export { OktaAccount } from "./models/OktaAccount"; export { OktaAccountAttributes } from "./models/OktaAccountAttributes"; export { OktaAccountRequest } from "./models/OktaAccountRequest"; @@ -2436,6 +2451,7 @@ export { QueryFormula } from "./models/QueryFormula"; export { QuerySortOrder } from "./models/QuerySortOrder"; export { ReadinessGate } from "./models/ReadinessGate"; export { ReadinessGateThresholdType } from "./models/ReadinessGateThresholdType"; +export { RegionsConfig } from "./models/RegionsConfig"; export { RelationshipItem } from "./models/RelationshipItem"; export { RelationshipToIncidentAttachment } from "./models/RelationshipToIncidentAttachment"; export { RelationshipToIncidentAttachmentData } from "./models/RelationshipToIncidentAttachmentData"; @@ -3086,6 +3102,11 @@ export { TeamUpdate } from "./models/TeamUpdate"; export { TeamUpdateAttributes } from "./models/TeamUpdateAttributes"; export { TeamUpdateRelationships } from "./models/TeamUpdateRelationships"; export { TeamUpdateRequest } from "./models/TeamUpdateRequest"; +export { TenancyConfig } from "./models/TenancyConfig"; +export { TenancyConfigData } from "./models/TenancyConfigData"; +export { TenancyConfigDataAttributes } from "./models/TenancyConfigDataAttributes"; +export { TenancyConfigDataType } from "./models/TenancyConfigDataType"; +export { TenancyConfigList } from "./models/TenancyConfigList"; export { TimeRestriction } from "./models/TimeRestriction"; export { TimeRestrictions } from "./models/TimeRestrictions"; export { TimeseriesFormulaQueryRequest } from "./models/TimeseriesFormulaQueryRequest"; @@ -3121,6 +3142,10 @@ export { UpdateRuleRequest } from "./models/UpdateRuleRequest"; export { UpdateRuleRequestData } from "./models/UpdateRuleRequestData"; export { UpdateRuleResponse } from "./models/UpdateRuleResponse"; export { UpdateRuleResponseData } from "./models/UpdateRuleResponseData"; +export { UpdateTenancyConfigData } from "./models/UpdateTenancyConfigData"; +export { UpdateTenancyConfigDataAttributes } from "./models/UpdateTenancyConfigDataAttributes"; +export { UpdateTenancyConfigDataType } from "./models/UpdateTenancyConfigDataType"; +export { UpdateTenancyConfigRequest } from "./models/UpdateTenancyConfigRequest"; export { UpdateWorkflowRequest } from "./models/UpdateWorkflowRequest"; export { UpdateWorkflowResponse } from "./models/UpdateWorkflowResponse"; export { UpsertCatalogEntityRequest } from "./models/UpsertCatalogEntityRequest"; diff --git a/packages/datadog-api-client-v2/models/AuthCredentials.ts b/packages/datadog-api-client-v2/models/AuthCredentials.ts new file mode 100644 index 000000000000..d842be72a906 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AuthCredentials.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The auth credentials of the user. Consists of a public key fingerprint and private key. + */ +export class AuthCredentials { + /** + * The public key fingerprint. + */ + "fingerprint": string; + /** + * The `RSA` private key in `PEM` format. + */ + "privateKey": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + fingerprint: { + baseName: "fingerprint", + type: "string", + required: true, + }, + privateKey: { + baseName: "private_key", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AuthCredentials.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateTenancyConfigData.ts b/packages/datadog-api-client-v2/models/CreateTenancyConfigData.ts new file mode 100644 index 000000000000..ba8a9533a836 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateTenancyConfigData.ts @@ -0,0 +1,72 @@ +/** + * 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 { CreateTenancyConfigDataAttributes } from "./CreateTenancyConfigDataAttributes"; +import { CreateTenancyConfigDataType } from "./CreateTenancyConfigDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `CreateTenancyConfigData` object. + */ +export class CreateTenancyConfigData { + /** + * The definition of `CreateTenancyConfigDataAttributes` object. + */ + "attributes"?: CreateTenancyConfigDataAttributes; + /** + * The OCID of the tenancy to be integrated. + */ + "id": string; + /** + * OCI tenancy resource type. + */ + "type": CreateTenancyConfigDataType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "CreateTenancyConfigDataAttributes", + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "CreateTenancyConfigDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateTenancyConfigData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateTenancyConfigDataAttributes.ts b/packages/datadog-api-client-v2/models/CreateTenancyConfigDataAttributes.ts new file mode 100644 index 000000000000..1b3aae702a0a --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateTenancyConfigDataAttributes.ts @@ -0,0 +1,132 @@ +/** + * 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 { AuthCredentials } from "./AuthCredentials"; +import { OCILogsConfig } from "./OCILogsConfig"; +import { OCIMetricsConfig } from "./OCIMetricsConfig"; +import { RegionsConfig } from "./RegionsConfig"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `CreateTenancyConfigDataAttributes` object. + */ +export class CreateTenancyConfigDataAttributes { + /** + * The auth credentials of the user. Consists of a public key fingerprint and private key. + */ + "authCredentials": AuthCredentials; + /** + * The config version. It is not recommended to add or change this value, as it is determined internally. + */ + "configVersion"?: number; + /** + * The OCID of the compartment containing Datadog managed resources. + */ + "ddCompartmentId"?: string; + /** + * The OCID of the resource manager stack for creating Datadog managed resources. + */ + "ddStackId"?: string; + /** + * The home region of the tenancy to be integrated. + */ + "homeRegion": string; + /** + * The definition of `OCILogsConfig` object. + */ + "logsConfig"?: OCILogsConfig; + /** + * The definition of `OCIMetricsConfig` object. + */ + "metricsConfig"?: OCIMetricsConfig; + /** + * The definition of `RegionsConfig` object. + */ + "regionsConfig"?: RegionsConfig; + /** + * Enable or disable resource collection. + */ + "resourceCollectionEnabled"?: boolean; + /** + * The OCID of the user needed to authenticate and collect data. + */ + "userOcid": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + authCredentials: { + baseName: "auth_credentials", + type: "AuthCredentials", + required: true, + }, + configVersion: { + baseName: "config_version", + type: "number", + format: "int64", + }, + ddCompartmentId: { + baseName: "dd_compartment_id", + type: "string", + }, + ddStackId: { + baseName: "dd_stack_id", + type: "string", + }, + homeRegion: { + baseName: "home_region", + type: "string", + required: true, + }, + logsConfig: { + baseName: "logs_config", + type: "OCILogsConfig", + }, + metricsConfig: { + baseName: "metrics_config", + type: "OCIMetricsConfig", + }, + regionsConfig: { + baseName: "regions_config", + type: "RegionsConfig", + }, + resourceCollectionEnabled: { + baseName: "resource_collection_enabled", + type: "boolean", + }, + userOcid: { + baseName: "user_ocid", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateTenancyConfigDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateTenancyConfigDataType.ts b/packages/datadog-api-client-v2/models/CreateTenancyConfigDataType.ts new file mode 100644 index 000000000000..64d78d526e9e --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateTenancyConfigDataType.ts @@ -0,0 +1,14 @@ +/** + * 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 { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * OCI tenancy resource type. + */ + +export type CreateTenancyConfigDataType = typeof OCI_TENANCY | UnparsedObject; +export const OCI_TENANCY = "oci_tenancy"; diff --git a/packages/datadog-api-client-v2/models/CreateTenancyConfigRequest.ts b/packages/datadog-api-client-v2/models/CreateTenancyConfigRequest.ts new file mode 100644 index 000000000000..ed044110c4f9 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateTenancyConfigRequest.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 { CreateTenancyConfigData } from "./CreateTenancyConfigData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `CreateTenancyConfigRequest` object. + */ +export class CreateTenancyConfigRequest { + /** + * The definition of `CreateTenancyConfigData` object. + */ + "data"?: CreateTenancyConfigData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "CreateTenancyConfigData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateTenancyConfigRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OCILogsConfig.ts b/packages/datadog-api-client-v2/models/OCILogsConfig.ts new file mode 100644 index 000000000000..18fe9ca09ba6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/OCILogsConfig.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `OCILogsConfig` object. + */ +export class OCILogsConfig { + /** + * The compartment tag filters to apply to log collection. Each value represents a Datadog tag in the format key:value. + */ + "compartmentTagFilters"?: Array; + /** + * Enable or disable log collection. Disabled by default. + */ + "enabled"?: boolean; + /** + * The list of services to enable for log collection. + */ + "enabledServices"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + compartmentTagFilters: { + baseName: "compartment_tag_filters", + type: "Array", + }, + enabled: { + baseName: "enabled", + type: "boolean", + }, + enabledServices: { + baseName: "enabled_services", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OCILogsConfig.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OCIMetricsConfig.ts b/packages/datadog-api-client-v2/models/OCIMetricsConfig.ts new file mode 100644 index 000000000000..173f568073cc --- /dev/null +++ b/packages/datadog-api-client-v2/models/OCIMetricsConfig.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `OCIMetricsConfig` object. + */ +export class OCIMetricsConfig { + /** + * The compartment tag filters to apply to metric collection. Each value represents a Datadog tag in the format key:value. + */ + "compartmentTagFilters"?: Array; + /** + * Enable or disable metric collection. Enabled by default for all services. + */ + "enabled"?: boolean; + /** + * The list of services to exclude from metric collection. + */ + "excludedServices"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + compartmentTagFilters: { + baseName: "compartment_tag_filters", + type: "Array", + }, + enabled: { + baseName: "enabled", + type: "boolean", + }, + excludedServices: { + baseName: "excluded_services", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OCIMetricsConfig.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index ec1f38e87c05..e90b2180469d 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -128,6 +128,7 @@ import { AuditLogsResponseMetadata } from "./AuditLogsResponseMetadata"; import { AuditLogsResponsePage } from "./AuditLogsResponsePage"; import { AuditLogsSearchEventsRequest } from "./AuditLogsSearchEventsRequest"; import { AuditLogsWarning } from "./AuditLogsWarning"; +import { AuthCredentials } from "./AuthCredentials"; import { AuthNMapping } from "./AuthNMapping"; import { AuthNMappingAttributes } from "./AuthNMappingAttributes"; import { AuthNMappingCreateAttributes } from "./AuthNMappingCreateAttributes"; @@ -409,6 +410,9 @@ import { CreateRuleRequest } from "./CreateRuleRequest"; import { CreateRuleRequestData } from "./CreateRuleRequestData"; import { CreateRuleResponse } from "./CreateRuleResponse"; import { CreateRuleResponseData } from "./CreateRuleResponseData"; +import { CreateTenancyConfigData } from "./CreateTenancyConfigData"; +import { CreateTenancyConfigDataAttributes } from "./CreateTenancyConfigDataAttributes"; +import { CreateTenancyConfigRequest } from "./CreateTenancyConfigRequest"; import { CreateWorkflowRequest } from "./CreateWorkflowRequest"; import { CreateWorkflowResponse } from "./CreateWorkflowResponse"; import { Creator } from "./Creator"; @@ -1096,6 +1100,8 @@ import { NullableRelationshipToUser } from "./NullableRelationshipToUser"; import { NullableRelationshipToUserData } from "./NullableRelationshipToUserData"; import { NullableUserRelationship } from "./NullableUserRelationship"; import { NullableUserRelationshipData } from "./NullableUserRelationshipData"; +import { OCILogsConfig } from "./OCILogsConfig"; +import { OCIMetricsConfig } from "./OCIMetricsConfig"; import { ObservabilityPipeline } from "./ObservabilityPipeline"; import { ObservabilityPipelineAddEnvVarsProcessor } from "./ObservabilityPipelineAddEnvVarsProcessor"; import { ObservabilityPipelineAddEnvVarsProcessorVariable } from "./ObservabilityPipelineAddEnvVarsProcessorVariable"; @@ -1315,6 +1321,7 @@ import { RUMResponsePage } from "./RUMResponsePage"; import { RUMSearchEventsRequest } from "./RUMSearchEventsRequest"; import { RUMWarning } from "./RUMWarning"; import { ReadinessGate } from "./ReadinessGate"; +import { RegionsConfig } from "./RegionsConfig"; import { RelationshipItem } from "./RelationshipItem"; import { RelationshipToIncidentAttachment } from "./RelationshipToIncidentAttachment"; import { RelationshipToIncidentAttachmentData } from "./RelationshipToIncidentAttachmentData"; @@ -1780,6 +1787,10 @@ import { TeamsResponse } from "./TeamsResponse"; import { TeamsResponseLinks } from "./TeamsResponseLinks"; import { TeamsResponseMeta } from "./TeamsResponseMeta"; import { TeamsResponseMetaPagination } from "./TeamsResponseMetaPagination"; +import { TenancyConfig } from "./TenancyConfig"; +import { TenancyConfigData } from "./TenancyConfigData"; +import { TenancyConfigDataAttributes } from "./TenancyConfigDataAttributes"; +import { TenancyConfigList } from "./TenancyConfigList"; import { TimeRestriction } from "./TimeRestriction"; import { TimeRestrictions } from "./TimeRestrictions"; import { TimeseriesFormulaQueryRequest } from "./TimeseriesFormulaQueryRequest"; @@ -1809,6 +1820,9 @@ import { UpdateRuleRequest } from "./UpdateRuleRequest"; import { UpdateRuleRequestData } from "./UpdateRuleRequestData"; import { UpdateRuleResponse } from "./UpdateRuleResponse"; import { UpdateRuleResponseData } from "./UpdateRuleResponseData"; +import { UpdateTenancyConfigData } from "./UpdateTenancyConfigData"; +import { UpdateTenancyConfigDataAttributes } from "./UpdateTenancyConfigDataAttributes"; +import { UpdateTenancyConfigRequest } from "./UpdateTenancyConfigRequest"; import { UpdateWorkflowRequest } from "./UpdateWorkflowRequest"; import { UpdateWorkflowResponse } from "./UpdateWorkflowResponse"; import { UpsertCatalogEntityResponse } from "./UpsertCatalogEntityResponse"; @@ -2178,6 +2192,7 @@ const enumsMap: { [key: string]: any[] } = { CreateDataDeletionRequestBodyDataType: ["create_deletion_req"], CreatePageRequestDataType: ["pages"], CreatePageResponseDataType: ["pages"], + CreateTenancyConfigDataType: ["oci_tenancy"], CustomConnectionType: ["custom_connections"], CustomDestinationAttributeTagsRestrictionListType: [ "ALLOW_LIST", @@ -2998,10 +3013,12 @@ const enumsMap: { [key: string]: any[] } = { "team_links", "user_team_permissions", ], + TenancyConfigDataType: ["oci_tenancy"], TimeseriesFormulaRequestType: ["timeseries_request"], TimeseriesFormulaResponseType: ["timeseries_response"], TokenType: ["SECRET"], TriggerSource: ["security_findings", "security_signals"], + UpdateTenancyConfigDataType: ["oci_tenancy"], Urgency: ["low", "high", "dynamic"], UsageTimeSeriesType: ["usage_timeseries"], UserAttributesStatus: ["active", "deactivated", "pending"], @@ -3279,6 +3296,7 @@ const typeMap: { [index: string]: any } = { AuditLogsResponsePage: AuditLogsResponsePage, AuditLogsSearchEventsRequest: AuditLogsSearchEventsRequest, AuditLogsWarning: AuditLogsWarning, + AuthCredentials: AuthCredentials, AuthNMapping: AuthNMapping, AuthNMappingAttributes: AuthNMappingAttributes, AuthNMappingCreateAttributes: AuthNMappingCreateAttributes, @@ -3598,6 +3616,9 @@ const typeMap: { [index: string]: any } = { CreateRuleRequestData: CreateRuleRequestData, CreateRuleResponse: CreateRuleResponse, CreateRuleResponseData: CreateRuleResponseData, + CreateTenancyConfigData: CreateTenancyConfigData, + CreateTenancyConfigDataAttributes: CreateTenancyConfigDataAttributes, + CreateTenancyConfigRequest: CreateTenancyConfigRequest, CreateWorkflowRequest: CreateWorkflowRequest, CreateWorkflowResponse: CreateWorkflowResponse, Creator: Creator, @@ -4386,6 +4407,8 @@ const typeMap: { [index: string]: any } = { NullableRelationshipToUserData: NullableRelationshipToUserData, NullableUserRelationship: NullableUserRelationship, NullableUserRelationshipData: NullableUserRelationshipData, + OCILogsConfig: OCILogsConfig, + OCIMetricsConfig: OCIMetricsConfig, ObservabilityPipeline: ObservabilityPipeline, ObservabilityPipelineAddEnvVarsProcessor: ObservabilityPipelineAddEnvVarsProcessor, @@ -4669,6 +4692,7 @@ const typeMap: { [index: string]: any } = { RUMSearchEventsRequest: RUMSearchEventsRequest, RUMWarning: RUMWarning, ReadinessGate: ReadinessGate, + RegionsConfig: RegionsConfig, RelationshipItem: RelationshipItem, RelationshipToIncidentAttachment: RelationshipToIncidentAttachment, RelationshipToIncidentAttachmentData: RelationshipToIncidentAttachmentData, @@ -5215,6 +5239,10 @@ const typeMap: { [index: string]: any } = { TeamsResponseLinks: TeamsResponseLinks, TeamsResponseMeta: TeamsResponseMeta, TeamsResponseMetaPagination: TeamsResponseMetaPagination, + TenancyConfig: TenancyConfig, + TenancyConfigData: TenancyConfigData, + TenancyConfigDataAttributes: TenancyConfigDataAttributes, + TenancyConfigList: TenancyConfigList, TimeRestriction: TimeRestriction, TimeRestrictions: TimeRestrictions, TimeseriesFormulaQueryRequest: TimeseriesFormulaQueryRequest, @@ -5244,6 +5272,9 @@ const typeMap: { [index: string]: any } = { UpdateRuleRequestData: UpdateRuleRequestData, UpdateRuleResponse: UpdateRuleResponse, UpdateRuleResponseData: UpdateRuleResponseData, + UpdateTenancyConfigData: UpdateTenancyConfigData, + UpdateTenancyConfigDataAttributes: UpdateTenancyConfigDataAttributes, + UpdateTenancyConfigRequest: UpdateTenancyConfigRequest, UpdateWorkflowRequest: UpdateWorkflowRequest, UpdateWorkflowResponse: UpdateWorkflowResponse, UpsertCatalogEntityResponse: UpsertCatalogEntityResponse, diff --git a/packages/datadog-api-client-v2/models/RegionsConfig.ts b/packages/datadog-api-client-v2/models/RegionsConfig.ts new file mode 100644 index 000000000000..43b19bb7e270 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RegionsConfig.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `RegionsConfig` object. + */ +export class RegionsConfig { + /** + * The list of regions currently subscribed to . + */ + "available"?: Array; + /** + * The list of disabled regions. + */ + "disabled"?: Array; + /** + * The list of enabled regions. + */ + "enabled"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + available: { + baseName: "available", + type: "Array", + }, + disabled: { + baseName: "disabled", + type: "Array", + }, + enabled: { + baseName: "enabled", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RegionsConfig.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TenancyConfig.ts b/packages/datadog-api-client-v2/models/TenancyConfig.ts new file mode 100644 index 000000000000..bd12e67aa5eb --- /dev/null +++ b/packages/datadog-api-client-v2/models/TenancyConfig.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 { TenancyConfigData } from "./TenancyConfigData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `TenancyConfig` object. + */ +export class TenancyConfig { + /** + * The definition of `TenancyConfigData` object. + */ + "data"?: TenancyConfigData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "TenancyConfigData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TenancyConfig.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TenancyConfigData.ts b/packages/datadog-api-client-v2/models/TenancyConfigData.ts new file mode 100644 index 000000000000..50b998a15df2 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TenancyConfigData.ts @@ -0,0 +1,71 @@ +/** + * 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 { TenancyConfigDataAttributes } from "./TenancyConfigDataAttributes"; +import { TenancyConfigDataType } from "./TenancyConfigDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `TenancyConfigData` object. + */ +export class TenancyConfigData { + /** + * The definition of `TenancyConfigDataAttributes` object. + */ + "attributes"?: TenancyConfigDataAttributes; + /** + * The OCID of the tenancy config. + */ + "id"?: string; + /** + * OCI tenancy resource type. + */ + "type": TenancyConfigDataType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "TenancyConfigDataAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "TenancyConfigDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TenancyConfigData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TenancyConfigDataAttributes.ts b/packages/datadog-api-client-v2/models/TenancyConfigDataAttributes.ts new file mode 100644 index 000000000000..23df5abe18a8 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TenancyConfigDataAttributes.ts @@ -0,0 +1,136 @@ +/** + * 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 { OCILogsConfig } from "./OCILogsConfig"; +import { OCIMetricsConfig } from "./OCIMetricsConfig"; +import { RegionsConfig } from "./RegionsConfig"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `TenancyConfigDataAttributes` object. + */ +export class TenancyConfigDataAttributes { + /** + * The config version. It is not recommended to add or change this value, as it is determined internally. + */ + "configVersion"?: number; + /** + * Enable or disable cost collection. + */ + "costCollectionEnabled"?: boolean; + /** + * The OCID of the compartment containing Datadog managed resources. + */ + "ddCompartmentId"?: string; + /** + * The OCID of the resource manager stack for creating Datadog managed resources. + */ + "ddStackId"?: string; + /** + * The home region of the tenancy to be integrated. + */ + "homeRegion"?: string; + /** + * The definition of `OCILogsConfig` object. + */ + "logsConfig"?: OCILogsConfig; + /** + * The definition of `OCIMetricsConfig` object. + */ + "metricsConfig"?: OCIMetricsConfig; + /** + * The definition of `RegionsConfig` object. + */ + "regionsConfig"?: RegionsConfig; + /** + * Enable or disable resource collection. + */ + "resourceCollectionEnabled"?: boolean; + /** + * The attribute's tenancy_name. + */ + "tenancyName"?: string; + /** + * The OCID of the user needed to authenticate and collect data. + */ + "userOcid"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + configVersion: { + baseName: "config_version", + type: "number", + format: "int64", + }, + costCollectionEnabled: { + baseName: "cost_collection_enabled", + type: "boolean", + }, + ddCompartmentId: { + baseName: "dd_compartment_id", + type: "string", + }, + ddStackId: { + baseName: "dd_stack_id", + type: "string", + }, + homeRegion: { + baseName: "home_region", + type: "string", + }, + logsConfig: { + baseName: "logs_config", + type: "OCILogsConfig", + }, + metricsConfig: { + baseName: "metrics_config", + type: "OCIMetricsConfig", + }, + regionsConfig: { + baseName: "regions_config", + type: "RegionsConfig", + }, + resourceCollectionEnabled: { + baseName: "resource_collection_enabled", + type: "boolean", + }, + tenancyName: { + baseName: "tenancy_name", + type: "string", + }, + userOcid: { + baseName: "user_ocid", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TenancyConfigDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TenancyConfigDataType.ts b/packages/datadog-api-client-v2/models/TenancyConfigDataType.ts new file mode 100644 index 000000000000..72a538ccbca4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TenancyConfigDataType.ts @@ -0,0 +1,14 @@ +/** + * 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 { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * OCI tenancy resource type. + */ + +export type TenancyConfigDataType = typeof OCI_TENANCY | UnparsedObject; +export const OCI_TENANCY = "oci_tenancy"; diff --git a/packages/datadog-api-client-v2/models/TenancyConfigList.ts b/packages/datadog-api-client-v2/models/TenancyConfigList.ts new file mode 100644 index 000000000000..6951f334e055 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TenancyConfigList.ts @@ -0,0 +1,54 @@ +/** + * 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 { TenancyConfigData } from "./TenancyConfigData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `TenancyConfigList` object. + */ +export class TenancyConfigList { + /** + * The `TenancyConfigList` data. + */ + "data": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TenancyConfigList.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateTenancyConfigData.ts b/packages/datadog-api-client-v2/models/UpdateTenancyConfigData.ts new file mode 100644 index 000000000000..63d4c2c949ad --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateTenancyConfigData.ts @@ -0,0 +1,72 @@ +/** + * 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 { UpdateTenancyConfigDataAttributes } from "./UpdateTenancyConfigDataAttributes"; +import { UpdateTenancyConfigDataType } from "./UpdateTenancyConfigDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `UpdateTenancyConfigData` object. + */ +export class UpdateTenancyConfigData { + /** + * The definition of `UpdateTenancyConfigDataAttributes` object. + */ + "attributes"?: UpdateTenancyConfigDataAttributes; + /** + * The OCID of the tenancy to be integrated. + */ + "id": string; + /** + * OCI tenancy resource type. + */ + "type": UpdateTenancyConfigDataType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "UpdateTenancyConfigDataAttributes", + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "UpdateTenancyConfigDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateTenancyConfigData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateTenancyConfigDataAttributes.ts b/packages/datadog-api-client-v2/models/UpdateTenancyConfigDataAttributes.ts new file mode 100644 index 000000000000..915be95eb8af --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateTenancyConfigDataAttributes.ts @@ -0,0 +1,104 @@ +/** + * 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 { AuthCredentials } from "./AuthCredentials"; +import { OCILogsConfig } from "./OCILogsConfig"; +import { OCIMetricsConfig } from "./OCIMetricsConfig"; +import { RegionsConfig } from "./RegionsConfig"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `UpdateTenancyConfigDataAttributes` object. + */ +export class UpdateTenancyConfigDataAttributes { + /** + * The auth credentials of the user. Consists of a public key fingerprint and private key. + */ + "authCredentials"?: AuthCredentials; + /** + * The home region of the tenancy to be integrated. + */ + "homeRegion"?: string; + /** + * The definition of `OCILogsConfig` object. + */ + "logsConfig"?: OCILogsConfig; + /** + * The definition of `OCIMetricsConfig` object. + */ + "metricsConfig"?: OCIMetricsConfig; + /** + * The definition of `RegionsConfig` object. + */ + "regionsConfig"?: RegionsConfig; + /** + * Enable or disable resource collection. + */ + "resourceCollectionEnabled"?: boolean; + /** + * The OCID of the user needed to authenticate and collect data. + */ + "userOcid"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + authCredentials: { + baseName: "auth_credentials", + type: "AuthCredentials", + }, + homeRegion: { + baseName: "home_region", + type: "string", + }, + logsConfig: { + baseName: "logs_config", + type: "OCILogsConfig", + }, + metricsConfig: { + baseName: "metrics_config", + type: "OCIMetricsConfig", + }, + regionsConfig: { + baseName: "regions_config", + type: "RegionsConfig", + }, + resourceCollectionEnabled: { + baseName: "resource_collection_enabled", + type: "boolean", + }, + userOcid: { + baseName: "user_ocid", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateTenancyConfigDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateTenancyConfigDataType.ts b/packages/datadog-api-client-v2/models/UpdateTenancyConfigDataType.ts new file mode 100644 index 000000000000..561f8f56f9c2 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateTenancyConfigDataType.ts @@ -0,0 +1,14 @@ +/** + * 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 { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * OCI tenancy resource type. + */ + +export type UpdateTenancyConfigDataType = typeof OCI_TENANCY | UnparsedObject; +export const OCI_TENANCY = "oci_tenancy"; diff --git a/packages/datadog-api-client-v2/models/UpdateTenancyConfigRequest.ts b/packages/datadog-api-client-v2/models/UpdateTenancyConfigRequest.ts new file mode 100644 index 000000000000..69789623dd5a --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateTenancyConfigRequest.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 { UpdateTenancyConfigData } from "./UpdateTenancyConfigData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `UpdateTenancyConfigRequest` object. + */ +export class UpdateTenancyConfigRequest { + /** + * The definition of `UpdateTenancyConfigData` object. + */ + "data"?: UpdateTenancyConfigData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "UpdateTenancyConfigData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateTenancyConfigRequest.attributeTypeMap; + } + + public constructor() {} +}