From 5c0f6c8dca0b498a4173deaf8bdeb13c40cf2ce3 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 16 Nov 2026 20:16:49 +0000 Subject: [PATCH] Regenerate client from commit 1bea643 of spec repo --- .generator/schemas/v2/openapi.yaml | 563 ++++++++++++++++++ .../CreateCoreWeaveCloudIntegrationAccount.rb | 40 ++ .../DeleteCoreWeaveCloudIntegrationAccount.rb | 9 + .../GetCoreWeaveCloudIntegrationAccount.rb | 9 + .../ListCoreWeaveCloudIntegrationAccounts.rb | 9 + .../UpdateCoreWeaveCloudIntegrationAccount.rb | 41 ++ features/scenarios_model_mapping.rb | 13 + features/v2/coreweave_integration.feature | 148 +++++ features/v2/undo.json | 37 ++ lib/datadog_api_client/configuration.rb | 5 + lib/datadog_api_client/inflector.rb | 27 + .../v2/api/core_weave_integration_api.rb | 385 ++++++++++++ ...egration_account_api_token_auth_request.rb | 125 ++++ ...gration_account_api_token_auth_response.rb | 123 ++++ ...integration_account_api_token_auth_type.rb | 26 + ...tegration_account_api_token_auth_update.rb | 121 ++++ ...egration_account_authentication_request.rb | 62 ++ ...gration_account_authentication_response.rb | 62 ++ ...tegration_account_authentication_update.rb | 62 ++ ...d_integration_account_create_attributes.rb | 175 ++++++ ...e_cloud_integration_account_create_data.rb | 144 +++++ ...loud_integration_account_create_request.rb | 123 ++++ ...eave_cloud_integration_account_response.rb | 123 ++++ ...integration_account_response_attributes.rb | 164 +++++ ...cloud_integration_account_response_data.rb | 165 +++++ ...ud_integration_account_settings_request.rb | 94 +++ ...d_integration_account_settings_response.rb | 119 ++++ ...oud_integration_account_settings_update.rb | 94 +++ ...d_integration_account_update_attributes.rb | 135 +++++ ...e_cloud_integration_account_update_data.rb | 165 +++++ ...loud_integration_account_update_request.rb | 123 ++++ ...ave_cloud_integration_accounts_response.rb | 125 ++++ ...ave_cloud_integration_dataflows_request.rb | 90 +++ ...ve_cloud_integration_dataflows_response.rb | 115 ++++ ...cloud_logs_integration_dataflow_request.rb | 80 +++ ...loud_logs_integration_dataflow_response.rb | 105 ++++ ...ud_metrics_integration_dataflow_request.rb | 80 +++ ...d_metrics_integration_dataflow_response.rb | 105 ++++ 38 files changed, 4191 insertions(+) create mode 100644 examples/v2/coreweave-integration/CreateCoreWeaveCloudIntegrationAccount.rb create mode 100644 examples/v2/coreweave-integration/DeleteCoreWeaveCloudIntegrationAccount.rb create mode 100644 examples/v2/coreweave-integration/GetCoreWeaveCloudIntegrationAccount.rb create mode 100644 examples/v2/coreweave-integration/ListCoreWeaveCloudIntegrationAccounts.rb create mode 100644 examples/v2/coreweave-integration/UpdateCoreWeaveCloudIntegrationAccount.rb create mode 100644 features/v2/coreweave_integration.feature create mode 100644 lib/datadog_api_client/v2/api/core_weave_integration_api.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_api_token_auth_request.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_api_token_auth_response.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_api_token_auth_type.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_api_token_auth_update.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_authentication_request.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_authentication_response.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_authentication_update.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_create_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_create_data.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_create_request.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_response.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_response_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_settings_request.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_settings_response.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_settings_update.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_update_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_update_data.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_accounts_response.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_dataflows_request.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_integration_dataflows_response.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_logs_integration_dataflow_request.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_logs_integration_dataflow_response.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_metrics_integration_dataflow_request.rb create mode 100644 lib/datadog_api_client/v2/models/core_weave_cloud_metrics_integration_dataflow_response.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c0368d657db4..baae26319afb 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -29989,6 +29989,322 @@ components: data: $ref: "#/components/schemas/ConvertJobResultsToSignalsData" type: object + CoreWeaveCloudIntegrationAccountAPITokenAuthRequest: + additionalProperties: false + description: >- + API token authentication, the only method CoreWeave integration accounts support. Create the token in the CoreWeave Cloud console under Access Tokens; it starts with `CW-SECRET-`. The user who owns the token must have the Observability Viewer role, because tokens inherit their user's permissions. + properties: + api_token: + description: >- + Secret CoreWeave API access token used to authenticate with CoreWeave. Values that do not start with `CW-SECRET-` are rejected with a `422` response. + example: CW-SECRET-xxxxxxxxxxxxxxxxxxxx + pattern: "^CW-SECRET-.+" + type: string + writeOnly: true + auth_type: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountAPITokenAuthType" + required: + - auth_type + - api_token + type: object + CoreWeaveCloudIntegrationAccountAPITokenAuthResponse: + description: The API token authentication method configured on the account. + properties: + auth_type: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountAPITokenAuthType" + required: + - auth_type + type: object + CoreWeaveCloudIntegrationAccountAPITokenAuthType: + default: coreweave_api_token + description: The authentication method type. + enum: + - coreweave_api_token + example: coreweave_api_token + type: string + x-enum-varnames: + - COREWEAVE_API_TOKEN + CoreWeaveCloudIntegrationAccountAPITokenAuthUpdate: + additionalProperties: false + description: >- + API token authentication, the only method CoreWeave integration accounts support. Only the fields provided are changed; omit `api_token` to keep the stored one. + properties: + api_token: + description: >- + Secret CoreWeave API access token used to authenticate with CoreWeave. It cannot be cleared; sending `null` or an empty string is rejected with a `422` response. + example: CW-SECRET-xxxxxxxxxxxxxxxxxxxx + pattern: "^CW-SECRET-.+" + type: string + writeOnly: true + auth_type: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountAPITokenAuthType" + required: + - auth_type + type: object + CoreWeaveCloudIntegrationAccountAuthenticationRequest: + description: Authentication for creating the CoreWeave integration account. Exactly one method is set. + oneOf: + - $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountAPITokenAuthRequest" + CoreWeaveCloudIntegrationAccountAuthenticationResponse: + description: Authentication configured on the CoreWeave integration account. + oneOf: + - $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountAPITokenAuthResponse" + CoreWeaveCloudIntegrationAccountAuthenticationUpdate: + description: Authentication for updating the CoreWeave integration account. Exactly one method is set. + oneOf: + - $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountAPITokenAuthUpdate" + CoreWeaveCloudIntegrationAccountCreateAttributes: + description: Writable attributes used to create a CoreWeave integration account. + properties: + authentication: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountAuthenticationRequest" + dataflows: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationDataflowsRequest" + name: + description: Human-readable name of the CoreWeave integration account. + example: coreweave-prod + type: string + settings: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountSettingsRequest" + required: + - name + - authentication + - settings + type: object + CoreWeaveCloudIntegrationAccountCreateData: + description: Data envelope for creating a CoreWeave integration account. + properties: + attributes: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountCreateAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + CoreWeaveCloudIntegrationAccountCreateRequest: + description: Request payload to create a CoreWeave integration account. + properties: + data: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountCreateData" + required: + - data + type: object + CoreWeaveCloudIntegrationAccountResponse: + description: Response payload for a single CoreWeave integration account. + properties: + data: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountResponseData" + required: + - data + type: object + CoreWeaveCloudIntegrationAccountResponseAttributes: + description: Attributes of a CoreWeave integration account returned in responses. + properties: + authentication: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountAuthenticationResponse" + dataflows: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationDataflowsResponse" + name: + description: Human-readable name of the CoreWeave integration account. + example: coreweave-prod + type: string + settings: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountSettingsResponse" + required: + - name + - settings + type: object + CoreWeaveCloudIntegrationAccountResponseData: + description: Data envelope of a CoreWeave integration account, including server-assigned identity. + properties: + attributes: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountResponseAttributes" + id: + description: Server-generated unique identifier of the CoreWeave integration account. + example: f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2 + readOnly: true + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - attributes + - type + type: object + CoreWeaveCloudIntegrationAccountSettingsRequest: + additionalProperties: false + description: Settings for creating the CoreWeave integration account. + properties: + account_tags: + description: >- + Tags added to all metrics and logs collected from this CoreWeave account. Defaults to no tags. + example: + - env:prod + - team:gpu + items: + type: string + type: array + cluster_filters: + description: >- + Tag-filter rules limiting metric collection to matching clusters, for cost savings. Include rules (`key:value`) are combined with OR, exclusion rules (`!key:value`) are then applied with AND, and `?` and `*` are wildcards; for example `cluster:prod-*` collects only matching clusters and `!cluster:dev` excludes a cluster. Defaults to no filters: every cluster is collected. Only cluster-scoped metrics are filtered; billing and object storage metrics are always collected. + example: + - cluster:prod-* + - "!cluster:dev" + items: + type: string + type: array + type: object + CoreWeaveCloudIntegrationAccountSettingsResponse: + description: Settings configured on the CoreWeave integration account. + properties: + account_tags: + description: Tags added to all data collected from this CoreWeave account. + example: + - env:prod + - team:gpu + items: + type: string + type: array + cluster_filters: + description: >- + Tag-filter rules limiting metric collection to matching clusters. Absent when no filters are configured. + example: + - cluster:prod-* + - "!cluster:dev" + items: + type: string + type: array + type: object + CoreWeaveCloudIntegrationAccountSettingsUpdate: + additionalProperties: false + description: Settings for updating the CoreWeave integration account. Only the fields provided are changed. + properties: + account_tags: + description: >- + Tags added to all metrics and logs collected from this CoreWeave account. Sending it replaces the whole list; send an empty array to remove all tags, or omit it to keep the stored list. + example: + - env:prod + - team:gpu + items: + type: string + type: array + cluster_filters: + description: >- + Tag-filter rules limiting metric collection to matching clusters. Sending it replaces the whole list; send an empty array to remove all filters and collect every cluster, or omit it to keep the stored list. Include rules (`key:value`) are combined with OR, exclusion rules (`!key:value`) are then applied with AND, and `?` and `*` are wildcards. + example: + - cluster:prod-* + - "!cluster:dev" + items: + type: string + type: array + type: object + CoreWeaveCloudIntegrationAccountUpdateAttributes: + description: >- + Writable attributes used to update a CoreWeave integration account. Every field is optional; only the fields provided are changed. When `dataflows` is provided, only the dataflow ids included in the request are modified; dataflows omitted from the map keep their current configuration. + properties: + authentication: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountAuthenticationUpdate" + dataflows: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationDataflowsRequest" + name: + description: Human-readable name of the CoreWeave integration account. + example: coreweave-prod + type: string + settings: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountSettingsUpdate" + type: object + CoreWeaveCloudIntegrationAccountUpdateData: + description: Data envelope for updating a CoreWeave integration account. + properties: + attributes: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountUpdateAttributes" + id: + description: Unique identifier of the CoreWeave integration account to update. + example: f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2 + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - type + - attributes + type: object + CoreWeaveCloudIntegrationAccountUpdateRequest: + description: Request payload to update a CoreWeave integration account. + properties: + data: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountUpdateData" + required: + - data + type: object + CoreWeaveCloudIntegrationAccountsResponse: + description: Response payload for a list of CoreWeave integration accounts. + properties: + data: + description: List of CoreWeave integration accounts. + items: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountResponseData" + type: array + required: + - data + type: object + CoreWeaveCloudIntegrationDataflowsRequest: + additionalProperties: false + description: >- + Data Datadog collects from CoreWeave, keyed by dataflow id. Each dataflow turns on a distinct kind of collection: set `enabled` to start or stop it. Defaults listed on each dataflow apply when the account is created; on update, omitted dataflow ids keep their current values. Collection runs with the API access token in `authentication`, whose user must have the Observability Viewer role; a dataflow enabled without that role is stored but collects no data. + properties: + coreweave-cloud-logs: + $ref: "#/components/schemas/CoreWeaveCloudLogsIntegrationDataflowRequest" + coreweave-cloud-metrics: + $ref: "#/components/schemas/CoreWeaveCloudMetricsIntegrationDataflowRequest" + type: object + CoreWeaveCloudIntegrationDataflowsResponse: + description: Data Datadog collects from CoreWeave, keyed by dataflow id. + properties: + coreweave-cloud-logs: + $ref: "#/components/schemas/CoreWeaveCloudLogsIntegrationDataflowResponse" + coreweave-cloud-metrics: + $ref: "#/components/schemas/CoreWeaveCloudMetricsIntegrationDataflowResponse" + type: object + CoreWeaveCloudLogsIntegrationDataflowRequest: + additionalProperties: false + description: >- + Service logs for CoreWeave-managed components in each CoreWeave region: the CKS control plane (such as `kube-apiserver` and `etcd`), CoreWeave add-on services in the `cw-*` and `kube-system` namespaces, SUNK, and node system logs such as `kubelet` and `containerd`. Logs from your own workloads and Kubernetes audit logs are not collected. Logs are sent with `source:coreweave`, with CoreWeave log labels such as `namespace`, `app`, and `systemd_unit` added as tags. + properties: + enabled: + description: Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection. + example: true + type: boolean + type: object + CoreWeaveCloudLogsIntegrationDataflowResponse: + description: >- + Service logs for CoreWeave-managed components in each CoreWeave region: the CKS control plane (such as `kube-apiserver` and `etcd`), CoreWeave add-on services in the `cw-*` and `kube-system` namespaces, SUNK, and node system logs such as `kubelet` and `containerd`. Logs from your own workloads and Kubernetes audit logs are not collected. Logs are sent with `source:coreweave`, with CoreWeave log labels such as `namespace`, `app`, and `systemd_unit` added as tags. + properties: + enabled: + description: Whether Datadog collects this data. Absent when the dataflow has never been configured, in which case the documented default applies. + example: true + type: boolean + type: object + CoreWeaveCloudMetricsIntegrationDataflowRequest: + additionalProperties: false + description: >- + Metrics from your CoreWeave organization: CoreWeave service metrics collected through its PromQL-compatible Prometheus endpoint, plus the `coreweave.*` namespaces from CoreWeave products such as Kubernetes, Database, Distributed File Storage, Inference, and Object Storage. Compute metrics (`coreweave.bare_metal`, `coreweave.gpu`, `coreweave.nccl`, and `coreweave.node`) are in Preview. Container metrics are not collected; install the Datadog Agent on your clusters for those. + properties: + enabled: + description: Whether Datadog collects this data. Defaults to `true`; set to `false` to stop collection. + example: true + type: boolean + type: object + CoreWeaveCloudMetricsIntegrationDataflowResponse: + description: >- + Metrics from your CoreWeave organization: CoreWeave service metrics collected through its PromQL-compatible Prometheus endpoint, plus the `coreweave.*` namespaces from CoreWeave products such as Kubernetes, Database, Distributed File Storage, Inference, and Object Storage. Compute metrics (`coreweave.bare_metal`, `coreweave.gpu`, `coreweave.nccl`, and `coreweave.node`) are in Preview. Container metrics are not collected; install the Datadog Agent on your clusters for those. + properties: + enabled: + description: Whether Datadog collects this data. Absent when the dataflow has never been configured, in which case the documented default applies. + example: true + type: boolean + type: object CostAggregationType: description: "Controls how costs are aggregated when using `start_date`. The `cumulative` option returns month-to-date running totals." enum: @@ -200610,6 +200926,244 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/integration-interfaces/coreweave-cloud/accounts: + get: + description: List CoreWeave integration accounts. + operationId: ListCoreWeaveCloudIntegrationAccounts + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + authentication: + auth_type: coreweave_api_token + dataflows: + coreweave-cloud-logs: + enabled: true + coreweave-cloud-metrics: + enabled: true + name: coreweave-prod + settings: + account_tags: + - env:prod + - team:gpu + id: f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2 + type: integration-account + schema: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List CoreWeave integration accounts + tags: + - CoreWeave Integration + "x-permission": + operator: OR + permissions: + - integrations_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a CoreWeave integration account. + operationId: CreateCoreWeaveCloudIntegrationAccount + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: coreweave_api_token + dataflows: + coreweave-cloud-logs: + enabled: true + coreweave-cloud-metrics: + enabled: true + name: coreweave-prod + settings: + account_tags: + - env:prod + - team:gpu + id: f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2 + type: integration-account + schema: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "422": + $ref: "#/components/responses/UnprocessableEntityResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a CoreWeave integration account + tags: + - CoreWeave Integration + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - manage_integrations + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/integration-interfaces/coreweave-cloud/accounts/{account_id}: + delete: + description: Delete a CoreWeave integration account. + operationId: DeleteCoreWeaveCloudIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a CoreWeave integration account + tags: + - CoreWeave Integration + "x-permission": + operator: OR + permissions: + - manage_integrations + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a CoreWeave integration account. + operationId: GetCoreWeaveCloudIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: coreweave_api_token + dataflows: + coreweave-cloud-logs: + enabled: true + coreweave-cloud-metrics: + enabled: true + name: coreweave-prod + settings: + account_tags: + - env:prod + - team:gpu + id: f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2 + type: integration-account + schema: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a CoreWeave integration account + tags: + - CoreWeave Integration + "x-permission": + operator: OR + permissions: + - integrations_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Update a CoreWeave integration account. Only the fields provided are changed. + operationId: UpdateCoreWeaveCloudIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: coreweave_api_token + dataflows: + coreweave-cloud-logs: + enabled: true + coreweave-cloud-metrics: + enabled: true + name: coreweave-prod + settings: + account_tags: + - env:prod + - team:gpu + id: f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2 + type: integration-account + schema: + $ref: "#/components/schemas/CoreWeaveCloudIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "422": + $ref: "#/components/responses/UnprocessableEntityResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a CoreWeave integration account + tags: + - CoreWeave Integration + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - manage_integrations + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/integration-interfaces/databricks/accounts: get: description: List Databricks integration accounts. @@ -275851,6 +276405,15 @@ tags: The Containers API allows you to query container data for your organization. See the [Container Monitoring page](https://docs.datadoghq.com/containers/) for more information. name: Containers + - description: |- + Manage your Datadog CoreWeave integration accounts and account resources + directly through the Datadog API. See the + [CoreWeave integration page](https://docs.datadoghq.com/integrations/coreweave/) for + more information. + externalDocs: + description: CoreWeave integration. + url: https://docs.datadoghq.com/integrations/coreweave/ + name: CoreWeave Integration - description: |- Programmatic management of a customer's Datadog organization. Use this API to perform self-service organization lifecycle actions such as disabling the authenticated org. diff --git a/examples/v2/coreweave-integration/CreateCoreWeaveCloudIntegrationAccount.rb b/examples/v2/coreweave-integration/CreateCoreWeaveCloudIntegrationAccount.rb new file mode 100644 index 000000000000..648a753f40e4 --- /dev/null +++ b/examples/v2/coreweave-integration/CreateCoreWeaveCloudIntegrationAccount.rb @@ -0,0 +1,40 @@ +# Create a CoreWeave integration account returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.access_token = ENV["DD_BEARER_TOKEN"] + config.unstable_operations["v2.create_core_weave_cloud_integration_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::CoreWeaveIntegrationAPI.new + +body = DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountCreateRequest.new({ + data: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountCreateData.new({ + attributes: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountCreateAttributes.new({ + authentication: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountAPITokenAuthRequest.new({ + api_token: "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", + auth_type: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountAPITokenAuthType::COREWEAVE_API_TOKEN, + }), + dataflows: DatadogAPIClient::V2::CoreWeaveCloudIntegrationDataflowsRequest.new({ + coreweave_cloud_logs: DatadogAPIClient::V2::CoreWeaveCloudLogsIntegrationDataflowRequest.new({ + enabled: true, + }), + coreweave_cloud_metrics: DatadogAPIClient::V2::CoreWeaveCloudMetricsIntegrationDataflowRequest.new({ + enabled: true, + }), + }), + name: "coreweave-prod", + settings: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountSettingsRequest.new({ + account_tags: [ + "env:prod", + "team:gpu", + ], + cluster_filters: [ + "cluster:prod-*", + "!cluster:dev", + ], + }), + }), + type: DatadogAPIClient::V2::IntegrationAccountType::INTEGRATION_ACCOUNT, + }), +}) +p api_instance.create_core_weave_cloud_integration_account(body) diff --git a/examples/v2/coreweave-integration/DeleteCoreWeaveCloudIntegrationAccount.rb b/examples/v2/coreweave-integration/DeleteCoreWeaveCloudIntegrationAccount.rb new file mode 100644 index 000000000000..2d97fca5cffe --- /dev/null +++ b/examples/v2/coreweave-integration/DeleteCoreWeaveCloudIntegrationAccount.rb @@ -0,0 +1,9 @@ +# Delete a CoreWeave integration account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.access_token = ENV["DD_BEARER_TOKEN"] + config.unstable_operations["v2.delete_core_weave_cloud_integration_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::CoreWeaveIntegrationAPI.new +p api_instance.delete_core_weave_cloud_integration_account("account_id") diff --git a/examples/v2/coreweave-integration/GetCoreWeaveCloudIntegrationAccount.rb b/examples/v2/coreweave-integration/GetCoreWeaveCloudIntegrationAccount.rb new file mode 100644 index 000000000000..567fee97f91b --- /dev/null +++ b/examples/v2/coreweave-integration/GetCoreWeaveCloudIntegrationAccount.rb @@ -0,0 +1,9 @@ +# Get a CoreWeave integration account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.access_token = ENV["DD_BEARER_TOKEN"] + config.unstable_operations["v2.get_core_weave_cloud_integration_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::CoreWeaveIntegrationAPI.new +p api_instance.get_core_weave_cloud_integration_account("account_id") diff --git a/examples/v2/coreweave-integration/ListCoreWeaveCloudIntegrationAccounts.rb b/examples/v2/coreweave-integration/ListCoreWeaveCloudIntegrationAccounts.rb new file mode 100644 index 000000000000..7c8a6bb7dfa3 --- /dev/null +++ b/examples/v2/coreweave-integration/ListCoreWeaveCloudIntegrationAccounts.rb @@ -0,0 +1,9 @@ +# List CoreWeave integration accounts returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.access_token = ENV["DD_BEARER_TOKEN"] + config.unstable_operations["v2.list_core_weave_cloud_integration_accounts".to_sym] = true +end +api_instance = DatadogAPIClient::V2::CoreWeaveIntegrationAPI.new +p api_instance.list_core_weave_cloud_integration_accounts() diff --git a/examples/v2/coreweave-integration/UpdateCoreWeaveCloudIntegrationAccount.rb b/examples/v2/coreweave-integration/UpdateCoreWeaveCloudIntegrationAccount.rb new file mode 100644 index 000000000000..069255ce55d1 --- /dev/null +++ b/examples/v2/coreweave-integration/UpdateCoreWeaveCloudIntegrationAccount.rb @@ -0,0 +1,41 @@ +# Update a CoreWeave integration account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.access_token = ENV["DD_BEARER_TOKEN"] + config.unstable_operations["v2.update_core_weave_cloud_integration_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::CoreWeaveIntegrationAPI.new + +body = DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountUpdateRequest.new({ + data: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountUpdateData.new({ + attributes: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountUpdateAttributes.new({ + authentication: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountAPITokenAuthUpdate.new({ + api_token: "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", + auth_type: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountAPITokenAuthType::COREWEAVE_API_TOKEN, + }), + dataflows: DatadogAPIClient::V2::CoreWeaveCloudIntegrationDataflowsRequest.new({ + coreweave_cloud_logs: DatadogAPIClient::V2::CoreWeaveCloudLogsIntegrationDataflowRequest.new({ + enabled: true, + }), + coreweave_cloud_metrics: DatadogAPIClient::V2::CoreWeaveCloudMetricsIntegrationDataflowRequest.new({ + enabled: true, + }), + }), + name: "coreweave-prod", + settings: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountSettingsUpdate.new({ + account_tags: [ + "env:prod", + "team:gpu", + ], + cluster_filters: [ + "cluster:prod-*", + "!cluster:dev", + ], + }), + }), + id: "f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2", + type: DatadogAPIClient::V2::IntegrationAccountType::INTEGRATION_ACCOUNT, + }), +}) +p api_instance.update_core_weave_cloud_integration_account("account_id", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 07274057c608..2ec8bbdd616a 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -4720,6 +4720,19 @@ "id" => "UUID", "body" => "IncidentTimestampOverridePatchRequest", }, + "v2.CreateCoreWeaveCloudIntegrationAccount" => { + "body" => "CoreWeaveCloudIntegrationAccountCreateRequest", + }, + "v2.DeleteCoreWeaveCloudIntegrationAccount" => { + "account_id" => "String", + }, + "v2.GetCoreWeaveCloudIntegrationAccount" => { + "account_id" => "String", + }, + "v2.UpdateCoreWeaveCloudIntegrationAccount" => { + "account_id" => "String", + "body" => "CoreWeaveCloudIntegrationAccountUpdateRequest", + }, "v2.CreateDatabricksIntegrationAccount" => { "body" => "DatabricksIntegrationAccountCreateRequest", }, diff --git a/features/v2/coreweave_integration.feature b/features/v2/coreweave_integration.feature new file mode 100644 index 000000000000..3861d784e1c0 --- /dev/null +++ b/features/v2/coreweave_integration.feature @@ -0,0 +1,148 @@ +@endpoint(coreweave-integration) @endpoint(coreweave-integration-v2) +Feature: CoreWeave Integration + Manage your Datadog CoreWeave integration accounts and account resources + directly through the Datadog API. See the [CoreWeave integration + page](https://docs.datadoghq.com/integrations/coreweave/) for more + information. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "CoreWeaveIntegration" API + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: Create a CoreWeave integration account returns "Bad Request" response + Given operation "CreateCoreWeaveCloudIntegrationAccount" enabled + And new "CreateCoreWeaveCloudIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"api_token": "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", "auth_type": "coreweave_api_token"}, "dataflows": {"coreweave-cloud-logs": {"enabled": true}, "coreweave-cloud-metrics": {"enabled": true}}, "name": "coreweave-prod", "settings": {"account_tags": ["env:prod", "team:gpu"], "cluster_filters": ["cluster:prod-*", "!cluster:dev"]}}, "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: Create a CoreWeave integration account returns "Created" response + Given operation "CreateCoreWeaveCloudIntegrationAccount" enabled + And new "CreateCoreWeaveCloudIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"api_token": "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", "auth_type": "coreweave_api_token"}, "dataflows": {"coreweave-cloud-logs": {"enabled": true}, "coreweave-cloud-metrics": {"enabled": true}}, "name": "coreweave-prod", "settings": {"account_tags": ["env:prod", "team:gpu"], "cluster_filters": ["cluster:prod-*", "!cluster:dev"]}}, "type": "integration-account"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: Create a CoreWeave integration account returns "Not Found" response + Given operation "CreateCoreWeaveCloudIntegrationAccount" enabled + And new "CreateCoreWeaveCloudIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"api_token": "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", "auth_type": "coreweave_api_token"}, "dataflows": {"coreweave-cloud-logs": {"enabled": true}, "coreweave-cloud-metrics": {"enabled": true}}, "name": "coreweave-prod", "settings": {"account_tags": ["env:prod", "team:gpu"], "cluster_filters": ["cluster:prod-*", "!cluster:dev"]}}, "type": "integration-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: Create a CoreWeave integration account returns "The server cannot process the request because it contains invalid data." response + Given operation "CreateCoreWeaveCloudIntegrationAccount" enabled + And new "CreateCoreWeaveCloudIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"api_token": "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", "auth_type": "coreweave_api_token"}, "dataflows": {"coreweave-cloud-logs": {"enabled": true}, "coreweave-cloud-metrics": {"enabled": true}}, "name": "coreweave-prod", "settings": {"account_tags": ["env:prod", "team:gpu"], "cluster_filters": ["cluster:prod-*", "!cluster:dev"]}}, "type": "integration-account"}} + When the request is sent + Then the response status is 422 The server cannot process the request because it contains invalid data. + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: Delete a CoreWeave integration account returns "Bad Request" response + Given operation "DeleteCoreWeaveCloudIntegrationAccount" enabled + And new "DeleteCoreWeaveCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: Delete a CoreWeave integration account returns "Not Found" response + Given operation "DeleteCoreWeaveCloudIntegrationAccount" enabled + And new "DeleteCoreWeaveCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: Delete a CoreWeave integration account returns "OK" response + Given operation "DeleteCoreWeaveCloudIntegrationAccount" enabled + And new "DeleteCoreWeaveCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: Get a CoreWeave integration account returns "Bad Request" response + Given operation "GetCoreWeaveCloudIntegrationAccount" enabled + And new "GetCoreWeaveCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: Get a CoreWeave integration account returns "Not Found" response + Given operation "GetCoreWeaveCloudIntegrationAccount" enabled + And new "GetCoreWeaveCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: Get a CoreWeave integration account returns "OK" response + Given operation "GetCoreWeaveCloudIntegrationAccount" enabled + And new "GetCoreWeaveCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: List CoreWeave integration accounts returns "Bad Request" response + Given operation "ListCoreWeaveCloudIntegrationAccounts" enabled + And new "ListCoreWeaveCloudIntegrationAccounts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: List CoreWeave integration accounts returns "Not Found" response + Given operation "ListCoreWeaveCloudIntegrationAccounts" enabled + And new "ListCoreWeaveCloudIntegrationAccounts" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: List CoreWeave integration accounts returns "OK" response + Given operation "ListCoreWeaveCloudIntegrationAccounts" enabled + And new "ListCoreWeaveCloudIntegrationAccounts" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: Update a CoreWeave integration account returns "Bad Request" response + Given operation "UpdateCoreWeaveCloudIntegrationAccount" enabled + And new "UpdateCoreWeaveCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"api_token": "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", "auth_type": "coreweave_api_token"}, "dataflows": {"coreweave-cloud-logs": {"enabled": true}, "coreweave-cloud-metrics": {"enabled": true}}, "name": "coreweave-prod", "settings": {"account_tags": ["env:prod", "team:gpu"], "cluster_filters": ["cluster:prod-*", "!cluster:dev"]}}, "id": "f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2", "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: Update a CoreWeave integration account returns "Not Found" response + Given operation "UpdateCoreWeaveCloudIntegrationAccount" enabled + And new "UpdateCoreWeaveCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"api_token": "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", "auth_type": "coreweave_api_token"}, "dataflows": {"coreweave-cloud-logs": {"enabled": true}, "coreweave-cloud-metrics": {"enabled": true}}, "name": "coreweave-prod", "settings": {"account_tags": ["env:prod", "team:gpu"], "cluster_filters": ["cluster:prod-*", "!cluster:dev"]}}, "id": "f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2", "type": "integration-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: Update a CoreWeave integration account returns "OK" response + Given operation "UpdateCoreWeaveCloudIntegrationAccount" enabled + And new "UpdateCoreWeaveCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"api_token": "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", "auth_type": "coreweave_api_token"}, "dataflows": {"coreweave-cloud-logs": {"enabled": true}, "coreweave-cloud-metrics": {"enabled": true}}, "name": "coreweave-prod", "settings": {"account_tags": ["env:prod", "team:gpu"], "cluster_filters": ["cluster:prod-*", "!cluster:dev"]}}, "id": "f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2", "type": "integration-account"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/emerging-cloud-integrations + Scenario: Update a CoreWeave integration account returns "The server cannot process the request because it contains invalid data." response + Given operation "UpdateCoreWeaveCloudIntegrationAccount" enabled + And new "UpdateCoreWeaveCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"api_token": "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", "auth_type": "coreweave_api_token"}, "dataflows": {"coreweave-cloud-logs": {"enabled": true}, "coreweave-cloud-metrics": {"enabled": true}}, "name": "coreweave-prod", "settings": {"account_tags": ["env:prod", "team:gpu"], "cluster_filters": ["cluster:prod-*", "!cluster:dev"]}}, "id": "f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2", "type": "integration-account"}} + When the request is sent + Then the response status is 422 The server cannot process the request because it contains invalid data. diff --git a/features/v2/undo.json b/features/v2/undo.json index 0d9b33aa46f6..d20a297e00fa 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -4307,6 +4307,43 @@ "type": "safe" } }, + "ListCoreWeaveCloudIntegrationAccounts": { + "tag": "CoreWeave Integration", + "undo": { + "type": "safe" + } + }, + "CreateCoreWeaveCloudIntegrationAccount": { + "tag": "CoreWeave Integration", + "undo": { + "operationId": "DeleteCoreWeaveCloudIntegrationAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteCoreWeaveCloudIntegrationAccount": { + "tag": "CoreWeave Integration", + "undo": { + "type": "idempotent" + } + }, + "GetCoreWeaveCloudIntegrationAccount": { + "tag": "CoreWeave Integration", + "undo": { + "type": "safe" + } + }, + "UpdateCoreWeaveCloudIntegrationAccount": { + "tag": "CoreWeave Integration", + "undo": { + "type": "idempotent" + } + }, "ListDatabricksIntegrationAccounts": { "tag": "Databricks Integration", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index f3c25b0e12e0..29c426ee4e42 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -674,6 +674,11 @@ def initialize "v2.update_incident_user_defined_field": false, "v2.update_incident_user_defined_role": false, "v2.update_timestamp_override": false, + "v2.create_core_weave_cloud_integration_account": false, + "v2.delete_core_weave_cloud_integration_account": false, + "v2.get_core_weave_cloud_integration_account": false, + "v2.list_core_weave_cloud_integration_accounts": false, + "v2.update_core_weave_cloud_integration_account": false, "v2.create_databricks_integration_account": false, "v2.delete_databricks_integration_account": false, "v2.get_databricks_integration_account": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 36ab8f2db077..2030078b75f8 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2818,6 +2818,32 @@ def overrides "v2.convert_job_results_to_signals_data" => "ConvertJobResultsToSignalsData", "v2.convert_job_results_to_signals_data_type" => "ConvertJobResultsToSignalsDataType", "v2.convert_job_results_to_signals_request" => "ConvertJobResultsToSignalsRequest", + "v2.core_weave_cloud_integration_account_api_token_auth_request" => "CoreWeaveCloudIntegrationAccountAPITokenAuthRequest", + "v2.core_weave_cloud_integration_account_api_token_auth_response" => "CoreWeaveCloudIntegrationAccountAPITokenAuthResponse", + "v2.core_weave_cloud_integration_account_api_token_auth_type" => "CoreWeaveCloudIntegrationAccountAPITokenAuthType", + "v2.core_weave_cloud_integration_account_api_token_auth_update" => "CoreWeaveCloudIntegrationAccountAPITokenAuthUpdate", + "v2.core_weave_cloud_integration_account_authentication_request" => "CoreWeaveCloudIntegrationAccountAuthenticationRequest", + "v2.core_weave_cloud_integration_account_authentication_response" => "CoreWeaveCloudIntegrationAccountAuthenticationResponse", + "v2.core_weave_cloud_integration_account_authentication_update" => "CoreWeaveCloudIntegrationAccountAuthenticationUpdate", + "v2.core_weave_cloud_integration_account_create_attributes" => "CoreWeaveCloudIntegrationAccountCreateAttributes", + "v2.core_weave_cloud_integration_account_create_data" => "CoreWeaveCloudIntegrationAccountCreateData", + "v2.core_weave_cloud_integration_account_create_request" => "CoreWeaveCloudIntegrationAccountCreateRequest", + "v2.core_weave_cloud_integration_account_response" => "CoreWeaveCloudIntegrationAccountResponse", + "v2.core_weave_cloud_integration_account_response_attributes" => "CoreWeaveCloudIntegrationAccountResponseAttributes", + "v2.core_weave_cloud_integration_account_response_data" => "CoreWeaveCloudIntegrationAccountResponseData", + "v2.core_weave_cloud_integration_account_settings_request" => "CoreWeaveCloudIntegrationAccountSettingsRequest", + "v2.core_weave_cloud_integration_account_settings_response" => "CoreWeaveCloudIntegrationAccountSettingsResponse", + "v2.core_weave_cloud_integration_account_settings_update" => "CoreWeaveCloudIntegrationAccountSettingsUpdate", + "v2.core_weave_cloud_integration_accounts_response" => "CoreWeaveCloudIntegrationAccountsResponse", + "v2.core_weave_cloud_integration_account_update_attributes" => "CoreWeaveCloudIntegrationAccountUpdateAttributes", + "v2.core_weave_cloud_integration_account_update_data" => "CoreWeaveCloudIntegrationAccountUpdateData", + "v2.core_weave_cloud_integration_account_update_request" => "CoreWeaveCloudIntegrationAccountUpdateRequest", + "v2.core_weave_cloud_integration_dataflows_request" => "CoreWeaveCloudIntegrationDataflowsRequest", + "v2.core_weave_cloud_integration_dataflows_response" => "CoreWeaveCloudIntegrationDataflowsResponse", + "v2.core_weave_cloud_logs_integration_dataflow_request" => "CoreWeaveCloudLogsIntegrationDataflowRequest", + "v2.core_weave_cloud_logs_integration_dataflow_response" => "CoreWeaveCloudLogsIntegrationDataflowResponse", + "v2.core_weave_cloud_metrics_integration_dataflow_request" => "CoreWeaveCloudMetricsIntegrationDataflowRequest", + "v2.core_weave_cloud_metrics_integration_dataflow_response" => "CoreWeaveCloudMetricsIntegrationDataflowResponse", "v2.cost_aggregation_type" => "CostAggregationType", "v2.cost_anomalies_response" => "CostAnomaliesResponse", "v2.cost_anomalies_response_data" => "CostAnomaliesResponseData", @@ -10590,6 +10616,7 @@ def overrides "v2.confluent_cloud_api" => "ConfluentCloudAPI", "v2.container_images_api" => "ContainerImagesAPI", "v2.containers_api" => "ContainersAPI", + "v2.core_weave_integration_api" => "CoreWeaveIntegrationAPI", "v2.csm_agents_api" => "CSMAgentsAPI", "v2.csm_coverage_analysis_api" => "CSMCoverageAnalysisAPI", "v2.csm_ownership_api" => "CSMOwnershipAPI", diff --git a/lib/datadog_api_client/v2/api/core_weave_integration_api.rb b/lib/datadog_api_client/v2/api/core_weave_integration_api.rb new file mode 100644 index 000000000000..07f0c8c4b70d --- /dev/null +++ b/lib/datadog_api_client/v2/api/core_weave_integration_api.rb @@ -0,0 +1,385 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class CoreWeaveIntegrationAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create a CoreWeave integration account. + # + # @see #create_core_weave_cloud_integration_account_with_http_info + def create_core_weave_cloud_integration_account(body, opts = {}) + data, _status_code, _headers = create_core_weave_cloud_integration_account_with_http_info(body, opts) + data + end + + # Create a CoreWeave integration account. + # + # Create a CoreWeave integration account. + # + # @param body [CoreWeaveCloudIntegrationAccountCreateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(CoreWeaveCloudIntegrationAccountResponse, Integer, Hash)>] CoreWeaveCloudIntegrationAccountResponse data, response status code and response headers + def create_core_weave_cloud_integration_account_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_core_weave_cloud_integration_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_core_weave_cloud_integration_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_core_weave_cloud_integration_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CoreWeaveIntegrationAPI.create_core_weave_cloud_integration_account ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CoreWeaveIntegrationAPI.create_core_weave_cloud_integration_account" + end + # resource path + local_var_path = '/api/v2/integration-interfaces/coreweave-cloud/accounts' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'CoreWeaveCloudIntegrationAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_core_weave_cloud_integration_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CoreWeaveIntegrationAPI#create_core_weave_cloud_integration_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete a CoreWeave integration account. + # + # @see #delete_core_weave_cloud_integration_account_with_http_info + def delete_core_weave_cloud_integration_account(account_id, opts = {}) + delete_core_weave_cloud_integration_account_with_http_info(account_id, opts) + nil + end + + # Delete a CoreWeave integration account. + # + # Delete a CoreWeave integration account. + # + # @param account_id [String] Unique identifier of the integration account. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_core_weave_cloud_integration_account_with_http_info(account_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_core_weave_cloud_integration_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_core_weave_cloud_integration_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_core_weave_cloud_integration_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CoreWeaveIntegrationAPI.delete_core_weave_cloud_integration_account ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling CoreWeaveIntegrationAPI.delete_core_weave_cloud_integration_account" + end + # resource path + local_var_path = '/api/v2/integration-interfaces/coreweave-cloud/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :delete_core_weave_cloud_integration_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CoreWeaveIntegrationAPI#delete_core_weave_cloud_integration_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a CoreWeave integration account. + # + # @see #get_core_weave_cloud_integration_account_with_http_info + def get_core_weave_cloud_integration_account(account_id, opts = {}) + data, _status_code, _headers = get_core_weave_cloud_integration_account_with_http_info(account_id, opts) + data + end + + # Get a CoreWeave integration account. + # + # Get a CoreWeave integration account. + # + # @param account_id [String] Unique identifier of the integration account. + # @param opts [Hash] the optional parameters + # @return [Array<(CoreWeaveCloudIntegrationAccountResponse, Integer, Hash)>] CoreWeaveCloudIntegrationAccountResponse data, response status code and response headers + def get_core_weave_cloud_integration_account_with_http_info(account_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_core_weave_cloud_integration_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_core_weave_cloud_integration_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_core_weave_cloud_integration_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CoreWeaveIntegrationAPI.get_core_weave_cloud_integration_account ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling CoreWeaveIntegrationAPI.get_core_weave_cloud_integration_account" + end + # resource path + local_var_path = '/api/v2/integration-interfaces/coreweave-cloud/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'CoreWeaveCloudIntegrationAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_core_weave_cloud_integration_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CoreWeaveIntegrationAPI#get_core_weave_cloud_integration_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List CoreWeave integration accounts. + # + # @see #list_core_weave_cloud_integration_accounts_with_http_info + def list_core_weave_cloud_integration_accounts(opts = {}) + data, _status_code, _headers = list_core_weave_cloud_integration_accounts_with_http_info(opts) + data + end + + # List CoreWeave integration accounts. + # + # List CoreWeave integration accounts. + # + # @param opts [Hash] the optional parameters + # @return [Array<(CoreWeaveCloudIntegrationAccountsResponse, Integer, Hash)>] CoreWeaveCloudIntegrationAccountsResponse data, response status code and response headers + def list_core_weave_cloud_integration_accounts_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_core_weave_cloud_integration_accounts".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_core_weave_cloud_integration_accounts") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_core_weave_cloud_integration_accounts")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CoreWeaveIntegrationAPI.list_core_weave_cloud_integration_accounts ...' + end + # resource path + local_var_path = '/api/v2/integration-interfaces/coreweave-cloud/accounts' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'CoreWeaveCloudIntegrationAccountsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_core_weave_cloud_integration_accounts, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CoreWeaveIntegrationAPI#list_core_weave_cloud_integration_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update a CoreWeave integration account. + # + # @see #update_core_weave_cloud_integration_account_with_http_info + def update_core_weave_cloud_integration_account(account_id, body, opts = {}) + data, _status_code, _headers = update_core_weave_cloud_integration_account_with_http_info(account_id, body, opts) + data + end + + # Update a CoreWeave integration account. + # + # Update a CoreWeave integration account. Only the fields provided are changed. + # + # @param account_id [String] Unique identifier of the integration account. + # @param body [CoreWeaveCloudIntegrationAccountUpdateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(CoreWeaveCloudIntegrationAccountResponse, Integer, Hash)>] CoreWeaveCloudIntegrationAccountResponse data, response status code and response headers + def update_core_weave_cloud_integration_account_with_http_info(account_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_core_weave_cloud_integration_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_core_weave_cloud_integration_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_core_weave_cloud_integration_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CoreWeaveIntegrationAPI.update_core_weave_cloud_integration_account ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling CoreWeaveIntegrationAPI.update_core_weave_cloud_integration_account" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CoreWeaveIntegrationAPI.update_core_weave_cloud_integration_account" + end + # resource path + local_var_path = '/api/v2/integration-interfaces/coreweave-cloud/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'CoreWeaveCloudIntegrationAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :update_core_weave_cloud_integration_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CoreWeaveIntegrationAPI#update_core_weave_cloud_integration_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_api_token_auth_request.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_api_token_auth_request.rb new file mode 100644 index 000000000000..eac4f201e7c0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_api_token_auth_request.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # API token authentication, the only method CoreWeave integration accounts support. Create the token in the CoreWeave Cloud console under Access Tokens; it starts with `CW-SECRET-`. The user who owns the token must have the Observability Viewer role, because tokens inherit their user's permissions. + class CoreWeaveCloudIntegrationAccountAPITokenAuthRequest + include BaseGenericModel + + # Secret CoreWeave API access token used to authenticate with CoreWeave. Values that do not start with `CW-SECRET-` are rejected with a `422` response. + attr_reader :api_token + + # The authentication method type. + attr_reader :auth_type + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'auth_type' => :'auth_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'auth_type' => :'CoreWeaveCloudIntegrationAccountAPITokenAuthType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountAPITokenAuthRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountAPITokenAuthRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'auth_type') + self.auth_type = attributes[:'auth_type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_token.nil? + pattern = Regexp.new(/^CW-SECRET-.+/) + return false if @api_token !~ pattern + return false if @auth_type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_token [Object] Object to be assigned + # @!visibility private + def api_token=(api_token) + if api_token.nil? + fail ArgumentError, 'invalid value for "api_token", api_token cannot be nil.' + end + pattern = Regexp.new(/^CW-SECRET-.+/) + if api_token !~ pattern + fail ArgumentError, "invalid value for \"api_token\", must conform to the pattern #{pattern}." + end + @api_token = api_token + end + + # Custom attribute writer method with validation + # @param auth_type [Object] Object to be assigned + # @!visibility private + def auth_type=(auth_type) + if auth_type.nil? + fail ArgumentError, 'invalid value for "auth_type", auth_type cannot be nil.' + end + @auth_type = auth_type + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + auth_type == o.auth_type + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, auth_type].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_api_token_auth_response.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_api_token_auth_response.rb new file mode 100644 index 000000000000..83d19f36f71f --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_api_token_auth_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The API token authentication method configured on the account. + class CoreWeaveCloudIntegrationAccountAPITokenAuthResponse + include BaseGenericModel + + # The authentication method type. + attr_reader :auth_type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth_type' => :'auth_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth_type' => :'CoreWeaveCloudIntegrationAccountAPITokenAuthType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountAPITokenAuthResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'auth_type') + self.auth_type = attributes[:'auth_type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @auth_type.nil? + true + end + + # Custom attribute writer method with validation + # @param auth_type [Object] Object to be assigned + # @!visibility private + def auth_type=(auth_type) + if auth_type.nil? + fail ArgumentError, 'invalid value for "auth_type", auth_type cannot be nil.' + end + @auth_type = auth_type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + auth_type == o.auth_type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth_type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_api_token_auth_type.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_api_token_auth_type.rb new file mode 100644 index 000000000000..9c4c7de8a887 --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_api_token_auth_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The authentication method type. + class CoreWeaveCloudIntegrationAccountAPITokenAuthType + include BaseEnumModel + + COREWEAVE_API_TOKEN = "coreweave_api_token".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_api_token_auth_update.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_api_token_auth_update.rb new file mode 100644 index 000000000000..dbb9e25cb980 --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_api_token_auth_update.rb @@ -0,0 +1,121 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # API token authentication, the only method CoreWeave integration accounts support. Only the fields provided are changed; omit `api_token` to keep the stored one. + class CoreWeaveCloudIntegrationAccountAPITokenAuthUpdate + include BaseGenericModel + + # Secret CoreWeave API access token used to authenticate with CoreWeave. It cannot be cleared; sending `null` or an empty string is rejected with a `422` response. + attr_reader :api_token + + # The authentication method type. + attr_reader :auth_type + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'auth_type' => :'auth_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'auth_type' => :'CoreWeaveCloudIntegrationAccountAPITokenAuthType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountAPITokenAuthUpdate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountAPITokenAuthUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'auth_type') + self.auth_type = attributes[:'auth_type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + pattern = Regexp.new(/^CW-SECRET-.+/) + return false if !@api_token.nil? && @api_token !~ pattern + return false if @auth_type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_token [Object] Object to be assigned + # @!visibility private + def api_token=(api_token) + pattern = Regexp.new(/^CW-SECRET-.+/) + if !api_token.nil? && api_token !~ pattern + fail ArgumentError, "invalid value for \"api_token\", must conform to the pattern #{pattern}." + end + @api_token = api_token + end + + # Custom attribute writer method with validation + # @param auth_type [Object] Object to be assigned + # @!visibility private + def auth_type=(auth_type) + if auth_type.nil? + fail ArgumentError, 'invalid value for "auth_type", auth_type cannot be nil.' + end + @auth_type = auth_type + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + auth_type == o.auth_type + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, auth_type].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_authentication_request.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_authentication_request.rb new file mode 100644 index 000000000000..6166be79372c --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_authentication_request.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Authentication for creating the CoreWeave integration account. Exactly one method is set. + module CoreWeaveCloudIntegrationAccountAuthenticationRequest + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'CoreWeaveCloudIntegrationAccountAPITokenAuthRequest' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_authentication_response.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_authentication_response.rb new file mode 100644 index 000000000000..556fb4e336ab --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_authentication_response.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Authentication configured on the CoreWeave integration account. + module CoreWeaveCloudIntegrationAccountAuthenticationResponse + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'CoreWeaveCloudIntegrationAccountAPITokenAuthResponse' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_authentication_update.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_authentication_update.rb new file mode 100644 index 000000000000..c21c82aabb3a --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_authentication_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Authentication for updating the CoreWeave integration account. Exactly one method is set. + module CoreWeaveCloudIntegrationAccountAuthenticationUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'CoreWeaveCloudIntegrationAccountAPITokenAuthUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_create_attributes.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_create_attributes.rb new file mode 100644 index 000000000000..22623f9281e5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_create_attributes.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Writable attributes used to create a CoreWeave integration account. + class CoreWeaveCloudIntegrationAccountCreateAttributes + include BaseGenericModel + + # Authentication for creating the CoreWeave integration account. Exactly one method is set. + attr_reader :authentication + + # Data Datadog collects from CoreWeave, keyed by dataflow id. Each dataflow turns on a distinct kind of collection: set `enabled` to start or stop it. Defaults listed on each dataflow apply when the account is created; on update, omitted dataflow ids keep their current values. Collection runs with the API access token in `authentication`, whose user must have the Observability Viewer role; a dataflow enabled without that role is stored but collects no data. + attr_accessor :dataflows + + # Human-readable name of the CoreWeave integration account. + attr_reader :name + + # Settings for creating the CoreWeave integration account. + attr_reader :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'authentication' => :'authentication', + :'dataflows' => :'dataflows', + :'name' => :'name', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'authentication' => :'CoreWeaveCloudIntegrationAccountAuthenticationRequest', + :'dataflows' => :'CoreWeaveCloudIntegrationDataflowsRequest', + :'name' => :'String', + :'settings' => :'CoreWeaveCloudIntegrationAccountSettingsRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountCreateAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'authentication') + self.authentication = attributes[:'authentication'] + end + + if attributes.key?(:'dataflows') + self.dataflows = attributes[:'dataflows'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @authentication.nil? + return false if @name.nil? + return false if @settings.nil? + true + end + + # Custom attribute writer method with validation + # @param authentication [Object] Object to be assigned + # @!visibility private + def authentication=(authentication) + if authentication.nil? + fail ArgumentError, 'invalid value for "authentication", authentication cannot be nil.' + end + @authentication = authentication + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param settings [Object] Object to be assigned + # @!visibility private + def settings=(settings) + if settings.nil? + fail ArgumentError, 'invalid value for "settings", settings cannot be nil.' + end + @settings = settings + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authentication == o.authentication && + dataflows == o.dataflows && + name == o.name && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [authentication, dataflows, name, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_create_data.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_create_data.rb new file mode 100644 index 000000000000..b0d62d69341c --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_create_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data envelope for creating a CoreWeave integration account. + class CoreWeaveCloudIntegrationAccountCreateData + include BaseGenericModel + + # Writable attributes used to create a CoreWeave integration account. + attr_reader :attributes + + # The type of the integration account resource. Always `integration-account`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'CoreWeaveCloudIntegrationAccountCreateAttributes', + :'type' => :'IntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountCreateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_create_request.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_create_request.rb new file mode 100644 index 000000000000..79f0d2012b2f --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_create_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request payload to create a CoreWeave integration account. + class CoreWeaveCloudIntegrationAccountCreateRequest + include BaseGenericModel + + # Data envelope for creating a CoreWeave integration account. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'CoreWeaveCloudIntegrationAccountCreateData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountCreateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_response.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_response.rb new file mode 100644 index 000000000000..3104768b2292 --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response payload for a single CoreWeave integration account. + class CoreWeaveCloudIntegrationAccountResponse + include BaseGenericModel + + # Data envelope of a CoreWeave integration account, including server-assigned identity. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'CoreWeaveCloudIntegrationAccountResponseData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_response_attributes.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_response_attributes.rb new file mode 100644 index 000000000000..fa5d1a97d7f7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_response_attributes.rb @@ -0,0 +1,164 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a CoreWeave integration account returned in responses. + class CoreWeaveCloudIntegrationAccountResponseAttributes + include BaseGenericModel + + # Authentication configured on the CoreWeave integration account. + attr_accessor :authentication + + # Data Datadog collects from CoreWeave, keyed by dataflow id. + attr_accessor :dataflows + + # Human-readable name of the CoreWeave integration account. + attr_reader :name + + # Settings configured on the CoreWeave integration account. + attr_reader :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'authentication' => :'authentication', + :'dataflows' => :'dataflows', + :'name' => :'name', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'authentication' => :'CoreWeaveCloudIntegrationAccountAuthenticationResponse', + :'dataflows' => :'CoreWeaveCloudIntegrationDataflowsResponse', + :'name' => :'String', + :'settings' => :'CoreWeaveCloudIntegrationAccountSettingsResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountResponseAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'authentication') + self.authentication = attributes[:'authentication'] + end + + if attributes.key?(:'dataflows') + self.dataflows = attributes[:'dataflows'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + return false if @settings.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param settings [Object] Object to be assigned + # @!visibility private + def settings=(settings) + if settings.nil? + fail ArgumentError, 'invalid value for "settings", settings cannot be nil.' + end + @settings = settings + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authentication == o.authentication && + dataflows == o.dataflows && + name == o.name && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [authentication, dataflows, name, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_response_data.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_response_data.rb new file mode 100644 index 000000000000..805960c22352 --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_response_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data envelope of a CoreWeave integration account, including server-assigned identity. + class CoreWeaveCloudIntegrationAccountResponseData + include BaseGenericModel + + # Attributes of a CoreWeave integration account returned in responses. + attr_reader :attributes + + # Server-generated unique identifier of the CoreWeave integration account. + attr_reader :id + + # The type of the integration account resource. Always `integration-account`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'CoreWeaveCloudIntegrationAccountResponseAttributes', + :'id' => :'String', + :'type' => :'IntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_settings_request.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_settings_request.rb new file mode 100644 index 000000000000..541c7e041722 --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_settings_request.rb @@ -0,0 +1,94 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Settings for creating the CoreWeave integration account. + class CoreWeaveCloudIntegrationAccountSettingsRequest + include BaseGenericModel + + # Tags added to all metrics and logs collected from this CoreWeave account. Defaults to no tags. + attr_accessor :account_tags + + # Tag-filter rules limiting metric collection to matching clusters, for cost savings. Include rules (`key:value`) are combined with OR, exclusion rules (`!key:value`) are then applied with AND, and `?` and `*` are wildcards; for example `cluster:prod-*` collects only matching clusters and `!cluster:dev` excludes a cluster. Defaults to no filters: every cluster is collected. Only cluster-scoped metrics are filtered; billing and object storage metrics are always collected. + attr_accessor :cluster_filters + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account_tags' => :'account_tags', + :'cluster_filters' => :'cluster_filters' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account_tags' => :'Array', + :'cluster_filters' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountSettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'account_tags') + if (value = attributes[:'account_tags']).is_a?(Array) + self.account_tags = value + end + end + + if attributes.key?(:'cluster_filters') + if (value = attributes[:'cluster_filters']).is_a?(Array) + self.cluster_filters = value + end + end + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_tags == o.account_tags && + cluster_filters == o.cluster_filters + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account_tags, cluster_filters].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_settings_response.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_settings_response.rb new file mode 100644 index 000000000000..46f607788f54 --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_settings_response.rb @@ -0,0 +1,119 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Settings configured on the CoreWeave integration account. + class CoreWeaveCloudIntegrationAccountSettingsResponse + include BaseGenericModel + + # Tags added to all data collected from this CoreWeave account. + attr_accessor :account_tags + + # Tag-filter rules limiting metric collection to matching clusters. Absent when no filters are configured. + attr_accessor :cluster_filters + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account_tags' => :'account_tags', + :'cluster_filters' => :'cluster_filters' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account_tags' => :'Array', + :'cluster_filters' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountSettingsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'account_tags') + if (value = attributes[:'account_tags']).is_a?(Array) + self.account_tags = value + end + end + + if attributes.key?(:'cluster_filters') + if (value = attributes[:'cluster_filters']).is_a?(Array) + self.cluster_filters = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_tags == o.account_tags && + cluster_filters == o.cluster_filters && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account_tags, cluster_filters, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_settings_update.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_settings_update.rb new file mode 100644 index 000000000000..2b30484da5d2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_settings_update.rb @@ -0,0 +1,94 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Settings for updating the CoreWeave integration account. Only the fields provided are changed. + class CoreWeaveCloudIntegrationAccountSettingsUpdate + include BaseGenericModel + + # Tags added to all metrics and logs collected from this CoreWeave account. Sending it replaces the whole list; send an empty array to remove all tags, or omit it to keep the stored list. + attr_accessor :account_tags + + # Tag-filter rules limiting metric collection to matching clusters. Sending it replaces the whole list; send an empty array to remove all filters and collect every cluster, or omit it to keep the stored list. Include rules (`key:value`) are combined with OR, exclusion rules (`!key:value`) are then applied with AND, and `?` and `*` are wildcards. + attr_accessor :cluster_filters + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account_tags' => :'account_tags', + :'cluster_filters' => :'cluster_filters' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account_tags' => :'Array', + :'cluster_filters' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountSettingsUpdate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountSettingsUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'account_tags') + if (value = attributes[:'account_tags']).is_a?(Array) + self.account_tags = value + end + end + + if attributes.key?(:'cluster_filters') + if (value = attributes[:'cluster_filters']).is_a?(Array) + self.cluster_filters = value + end + end + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_tags == o.account_tags && + cluster_filters == o.cluster_filters + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account_tags, cluster_filters].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_update_attributes.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_update_attributes.rb new file mode 100644 index 000000000000..d7315711cc2a --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_update_attributes.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Writable attributes used to update a CoreWeave integration account. Every field is optional; only the fields provided are changed. When `dataflows` is provided, only the dataflow ids included in the request are modified; dataflows omitted from the map keep their current configuration. + class CoreWeaveCloudIntegrationAccountUpdateAttributes + include BaseGenericModel + + # Authentication for updating the CoreWeave integration account. Exactly one method is set. + attr_accessor :authentication + + # Data Datadog collects from CoreWeave, keyed by dataflow id. Each dataflow turns on a distinct kind of collection: set `enabled` to start or stop it. Defaults listed on each dataflow apply when the account is created; on update, omitted dataflow ids keep their current values. Collection runs with the API access token in `authentication`, whose user must have the Observability Viewer role; a dataflow enabled without that role is stored but collects no data. + attr_accessor :dataflows + + # Human-readable name of the CoreWeave integration account. + attr_accessor :name + + # Settings for updating the CoreWeave integration account. Only the fields provided are changed. + attr_accessor :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'authentication' => :'authentication', + :'dataflows' => :'dataflows', + :'name' => :'name', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'authentication' => :'CoreWeaveCloudIntegrationAccountAuthenticationUpdate', + :'dataflows' => :'CoreWeaveCloudIntegrationDataflowsRequest', + :'name' => :'String', + :'settings' => :'CoreWeaveCloudIntegrationAccountSettingsUpdate' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountUpdateAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'authentication') + self.authentication = attributes[:'authentication'] + end + + if attributes.key?(:'dataflows') + self.dataflows = attributes[:'dataflows'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authentication == o.authentication && + dataflows == o.dataflows && + name == o.name && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [authentication, dataflows, name, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_update_data.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_update_data.rb new file mode 100644 index 000000000000..adb8dc29966b --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_update_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data envelope for updating a CoreWeave integration account. + class CoreWeaveCloudIntegrationAccountUpdateData + include BaseGenericModel + + # Writable attributes used to update a CoreWeave integration account. Every field is optional; only the fields provided are changed. When `dataflows` is provided, only the dataflow ids included in the request are modified; dataflows omitted from the map keep their current configuration. + attr_reader :attributes + + # Unique identifier of the CoreWeave integration account to update. + attr_reader :id + + # The type of the integration account resource. Always `integration-account`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'CoreWeaveCloudIntegrationAccountUpdateAttributes', + :'id' => :'String', + :'type' => :'IntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountUpdateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_update_request.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_update_request.rb new file mode 100644 index 000000000000..acbef8246bae --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_account_update_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request payload to update a CoreWeave integration account. + class CoreWeaveCloudIntegrationAccountUpdateRequest + include BaseGenericModel + + # Data envelope for updating a CoreWeave integration account. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'CoreWeaveCloudIntegrationAccountUpdateData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountUpdateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_accounts_response.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_accounts_response.rb new file mode 100644 index 000000000000..bdc0a6db22d7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_accounts_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response payload for a list of CoreWeave integration accounts. + class CoreWeaveCloudIntegrationAccountsResponse + include BaseGenericModel + + # List of CoreWeave integration accounts. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_dataflows_request.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_dataflows_request.rb new file mode 100644 index 000000000000..86b8a33a47b9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_dataflows_request.rb @@ -0,0 +1,90 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data Datadog collects from CoreWeave, keyed by dataflow id. Each dataflow turns on a distinct kind of collection: set `enabled` to start or stop it. Defaults listed on each dataflow apply when the account is created; on update, omitted dataflow ids keep their current values. Collection runs with the API access token in `authentication`, whose user must have the Observability Viewer role; a dataflow enabled without that role is stored but collects no data. + class CoreWeaveCloudIntegrationDataflowsRequest + include BaseGenericModel + + # Service logs for CoreWeave-managed components in each CoreWeave region: the CKS control plane (such as `kube-apiserver` and `etcd`), CoreWeave add-on services in the `cw-*` and `kube-system` namespaces, SUNK, and node system logs such as `kubelet` and `containerd`. Logs from your own workloads and Kubernetes audit logs are not collected. Logs are sent with `source:coreweave`, with CoreWeave log labels such as `namespace`, `app`, and `systemd_unit` added as tags. + attr_accessor :coreweave_cloud_logs + + # Metrics from your CoreWeave organization: CoreWeave service metrics collected through its PromQL-compatible Prometheus endpoint, plus the `coreweave.*` namespaces from CoreWeave products such as Kubernetes, Database, Distributed File Storage, Inference, and Object Storage. Compute metrics (`coreweave.bare_metal`, `coreweave.gpu`, `coreweave.nccl`, and `coreweave.node`) are in Preview. Container metrics are not collected; install the Datadog Agent on your clusters for those. + attr_accessor :coreweave_cloud_metrics + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'coreweave_cloud_logs' => :'coreweave-cloud-logs', + :'coreweave_cloud_metrics' => :'coreweave-cloud-metrics' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'coreweave_cloud_logs' => :'CoreWeaveCloudLogsIntegrationDataflowRequest', + :'coreweave_cloud_metrics' => :'CoreWeaveCloudMetricsIntegrationDataflowRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationDataflowsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationDataflowsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'coreweave_cloud_logs') + self.coreweave_cloud_logs = attributes[:'coreweave_cloud_logs'] + end + + if attributes.key?(:'coreweave_cloud_metrics') + self.coreweave_cloud_metrics = attributes[:'coreweave_cloud_metrics'] + end + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + coreweave_cloud_logs == o.coreweave_cloud_logs && + coreweave_cloud_metrics == o.coreweave_cloud_metrics + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [coreweave_cloud_logs, coreweave_cloud_metrics].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_integration_dataflows_response.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_dataflows_response.rb new file mode 100644 index 000000000000..e7d707cf1ca1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_integration_dataflows_response.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data Datadog collects from CoreWeave, keyed by dataflow id. + class CoreWeaveCloudIntegrationDataflowsResponse + include BaseGenericModel + + # Service logs for CoreWeave-managed components in each CoreWeave region: the CKS control plane (such as `kube-apiserver` and `etcd`), CoreWeave add-on services in the `cw-*` and `kube-system` namespaces, SUNK, and node system logs such as `kubelet` and `containerd`. Logs from your own workloads and Kubernetes audit logs are not collected. Logs are sent with `source:coreweave`, with CoreWeave log labels such as `namespace`, `app`, and `systemd_unit` added as tags. + attr_accessor :coreweave_cloud_logs + + # Metrics from your CoreWeave organization: CoreWeave service metrics collected through its PromQL-compatible Prometheus endpoint, plus the `coreweave.*` namespaces from CoreWeave products such as Kubernetes, Database, Distributed File Storage, Inference, and Object Storage. Compute metrics (`coreweave.bare_metal`, `coreweave.gpu`, `coreweave.nccl`, and `coreweave.node`) are in Preview. Container metrics are not collected; install the Datadog Agent on your clusters for those. + attr_accessor :coreweave_cloud_metrics + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'coreweave_cloud_logs' => :'coreweave-cloud-logs', + :'coreweave_cloud_metrics' => :'coreweave-cloud-metrics' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'coreweave_cloud_logs' => :'CoreWeaveCloudLogsIntegrationDataflowResponse', + :'coreweave_cloud_metrics' => :'CoreWeaveCloudMetricsIntegrationDataflowResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudIntegrationDataflowsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'coreweave_cloud_logs') + self.coreweave_cloud_logs = attributes[:'coreweave_cloud_logs'] + end + + if attributes.key?(:'coreweave_cloud_metrics') + self.coreweave_cloud_metrics = attributes[:'coreweave_cloud_metrics'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + coreweave_cloud_logs == o.coreweave_cloud_logs && + coreweave_cloud_metrics == o.coreweave_cloud_metrics && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [coreweave_cloud_logs, coreweave_cloud_metrics, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_logs_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_logs_integration_dataflow_request.rb new file mode 100644 index 000000000000..e11f570ebe65 --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_logs_integration_dataflow_request.rb @@ -0,0 +1,80 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Service logs for CoreWeave-managed components in each CoreWeave region: the CKS control plane (such as `kube-apiserver` and `etcd`), CoreWeave add-on services in the `cw-*` and `kube-system` namespaces, SUNK, and node system logs such as `kubelet` and `containerd`. Logs from your own workloads and Kubernetes audit logs are not collected. Logs are sent with `source:coreweave`, with CoreWeave log labels such as `namespace`, `app`, and `systemd_unit` added as tags. + class CoreWeaveCloudLogsIntegrationDataflowRequest + include BaseGenericModel + + # Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection. + attr_accessor :enabled + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudLogsIntegrationDataflowRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CoreWeaveCloudLogsIntegrationDataflowRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_logs_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_logs_integration_dataflow_response.rb new file mode 100644 index 000000000000..71c7d0897991 --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_logs_integration_dataflow_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Service logs for CoreWeave-managed components in each CoreWeave region: the CKS control plane (such as `kube-apiserver` and `etcd`), CoreWeave add-on services in the `cw-*` and `kube-system` namespaces, SUNK, and node system logs such as `kubelet` and `containerd`. Logs from your own workloads and Kubernetes audit logs are not collected. Logs are sent with `source:coreweave`, with CoreWeave log labels such as `namespace`, `app`, and `systemd_unit` added as tags. + class CoreWeaveCloudLogsIntegrationDataflowResponse + include BaseGenericModel + + # Whether Datadog collects this data. Absent when the dataflow has never been configured, in which case the documented default applies. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudLogsIntegrationDataflowResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_metrics_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_metrics_integration_dataflow_request.rb new file mode 100644 index 000000000000..6cd3b614c720 --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_metrics_integration_dataflow_request.rb @@ -0,0 +1,80 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Metrics from your CoreWeave organization: CoreWeave service metrics collected through its PromQL-compatible Prometheus endpoint, plus the `coreweave.*` namespaces from CoreWeave products such as Kubernetes, Database, Distributed File Storage, Inference, and Object Storage. Compute metrics (`coreweave.bare_metal`, `coreweave.gpu`, `coreweave.nccl`, and `coreweave.node`) are in Preview. Container metrics are not collected; install the Datadog Agent on your clusters for those. + class CoreWeaveCloudMetricsIntegrationDataflowRequest + include BaseGenericModel + + # Whether Datadog collects this data. Defaults to `true`; set to `false` to stop collection. + attr_accessor :enabled + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudMetricsIntegrationDataflowRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CoreWeaveCloudMetricsIntegrationDataflowRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/core_weave_cloud_metrics_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/core_weave_cloud_metrics_integration_dataflow_response.rb new file mode 100644 index 000000000000..de3eb842207b --- /dev/null +++ b/lib/datadog_api_client/v2/models/core_weave_cloud_metrics_integration_dataflow_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Metrics from your CoreWeave organization: CoreWeave service metrics collected through its PromQL-compatible Prometheus endpoint, plus the `coreweave.*` namespaces from CoreWeave products such as Kubernetes, Database, Distributed File Storage, Inference, and Object Storage. Compute metrics (`coreweave.bare_metal`, `coreweave.gpu`, `coreweave.nccl`, and `coreweave.node`) are in Preview. Container metrics are not collected; install the Datadog Agent on your clusters for those. + class CoreWeaveCloudMetricsIntegrationDataflowResponse + include BaseGenericModel + + # Whether Datadog collects this data. Absent when the dataflow has never been configured, in which case the documented default applies. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CoreWeaveCloudMetricsIntegrationDataflowResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end