diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 49e923cae4..a67c3bf1fd 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -30514,6 +30514,146 @@ components: required: - data type: object + DatasetReportScheduleListResponse: + description: Response containing a list of report schedules for a published dataset. + properties: + data: + description: A list of report schedules for the dataset. + items: + $ref: "#/components/schemas/DatasetReportScheduleResponseData" + type: array + included: + description: Related resources included with the report schedules, such as authors. + items: + $ref: "#/components/schemas/ReportScheduleIncludedResource" + type: array + required: + - data + type: object + DatasetReportScheduleResourceType: + description: The type of resource targeted by a dataset report schedule. + enum: + - widget_dataset_list + example: widget_dataset_list + type: string + x-enum-varnames: + - WIDGET_DATASET_LIST + DatasetReportScheduleResponseAttributes: + description: The configuration and derived state of a report schedule for a published dataset. + properties: + cell_id: + description: The identifier of the notebook cell that published the dataset, or `null` if not set. + example: "sevhjcis" + nullable: true + type: string + dataset_id: + description: The identifier of the dataset, or `null` if not set. + example: "MW5vdGVib29rX2NlbGw6ZDI0ZTM2MWMtZDFlNC00NDYwLWIyOWUtNTg3YTczMzA3MDFm" + nullable: true + type: string + description: + description: The description of the report. + example: "This is a scheduled notebook dataset report." + type: string + file_row_limit: + description: The maximum number of rows included in the attached CSV file, or `null` if not set. + example: 5000 + format: int64 + nullable: true + type: integer + inline_row_limit: + description: The maximum number of rows included inline in the email body, or `null` if not set. + example: 10 + format: int64 + nullable: true + type: integer + next_recurrence: + description: |- + The Unix timestamp, in milliseconds, of the next scheduled delivery, or + `null` if none is scheduled. + example: 1725859200000 + format: int64 + nullable: true + type: integer + notebook_id: + description: The identifier of the notebook containing the dataset cell, or `null` if not set. + example: 1 + format: int64 + nullable: true + type: integer + recipients: + description: |- + The recipients of the report (email addresses, Slack channel references, or + Microsoft Teams channel references). + example: + - "test@datadoghq.com" + items: + description: |- + A single recipient (email address, Slack channel reference, or Microsoft + Teams channel reference). + type: string + type: array + resource_id: + description: The identifier of the widget containing the dataset. + example: "aaaabbbb-1111-2222-3333-444455556666" + type: string + resource_type: + $ref: "#/components/schemas/DatasetReportScheduleResourceType" + rrule: + description: The recurrence rule for the schedule, expressed as an iCalendar `RRULE` string. + example: "DTSTART;TZID=America/New_York:20240912T090000\nRRULE:FREQ=DAILY;BYHOUR=9;BYMINUTE=0" + type: string + status: + $ref: "#/components/schemas/ReportScheduleStatus" + timeframe: + description: The relative timeframe of data included in the report. + example: "calendar_day" + type: string + timezone: + description: The IANA time zone identifier the recurrence rule is evaluated in. + example: "America/New_York" + type: string + title: + description: The title of the report. + example: "My Cool Dataset Report" + type: string + required: + - status + - resource_id + - resource_type + - recipients + - rrule + - timezone + - title + - description + - timeframe + - file_row_limit + - inline_row_limit + - next_recurrence + - notebook_id + - cell_id + - dataset_id + type: object + DatasetReportScheduleResponseData: + description: The JSON:API data object representing a dataset report schedule. + properties: + attributes: + $ref: "#/components/schemas/DatasetReportScheduleResponseAttributes" + id: + description: The unique identifier of the dataset report schedule. + example: "e1234567-1234-1234-1234-123456789012" + format: uuid + type: string + relationships: + $ref: "#/components/schemas/ReportScheduleResponseRelationships" + type: + $ref: "#/components/schemas/ReportScheduleType" + required: + - id + - type + - attributes + - relationships + type: object DatasetRequest: description: |- **Datasets Object Constraints** @@ -70492,6 +70632,8 @@ components: $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit" maxItems: 100 type: array + tracking_mode: + $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode" type: $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorType" value_limit: @@ -70506,6 +70648,7 @@ components: - type - include - limit_exceeded_action + - tracking_mode - value_limit - enabled type: object @@ -70520,6 +70663,16 @@ components: x-enum-varnames: - DROP_TAG - DROP_EVENT + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType: + description: How the override is applied. `limit_override` enforces a custom limit; `excluded` omits the metric or tag from cardinality tracking. + enum: + - limit_override + - excluded + example: limit_override + type: string + x-enum-varnames: + - LIMIT_OVERRIDE + - EXCLUDED ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit: description: A cardinality override applied to a specific metric. properties: @@ -70529,16 +70682,16 @@ components: description: The name of the metric this override applies to. example: "system.cpu.user" type: string - mode: - $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode" + override_type: + $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorOverrideType" per_tag_limits: - description: A list of per-tag cardinality overrides that apply within this metric. Must be omitted when `mode` is `excluded`. + description: A list of per-tag cardinality overrides that apply within this metric. Must be omitted when `override_type` is `excluded`. items: $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit" maxItems: 50 type: array value_limit: - description: The maximum number of distinct tag value combinations allowed for this metric. Required when `mode` is `tracked`. Must be omitted when `mode` is `excluded`. + description: The maximum number of distinct tag value combinations allowed for this metric. Required when `override_type` is `limit_override`. Must be omitted when `override_type` is `excluded`. example: 10000 format: int64 maximum: 1000000 @@ -70546,29 +70699,19 @@ components: type: integer required: - metric_name - - mode + - override_type type: object - ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode: - description: How the per-metric override is applied. `tracked` enforces a custom limit; `excluded` skips the metric entirely. - enum: - - tracked - - excluded - example: tracked - type: string - x-enum-varnames: - - TRACKED - - EXCLUDED ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit: description: A cardinality override for a specific tag key within a per-metric limit. properties: - mode: - $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode" + override_type: + $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorOverrideType" tag_key: description: The tag key this override applies to. example: "host" type: string value_limit: - description: The maximum number of distinct values allowed for this tag. Required when `mode` is `limit_override`. Must be omitted when `mode` is `excluded`. + description: The maximum number of distinct values allowed for this tag. Required when `override_type` is `limit_override`. Must be omitted when `override_type` is `excluded`. example: 5000 format: int64 maximum: 1000000 @@ -70576,18 +70719,26 @@ components: type: integer required: - tag_key + - override_type + type: object + ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode: + description: Controls whether the processor uses exact or probabilistic tag tracking. + properties: + mode: + $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode" + required: - mode type: object - ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode: - description: How the per-tag override is applied. `limit_override` enforces a custom limit on the tag; `excluded` skips the tag from cardinality tracking. + ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode: + description: The cardinality tracking algorithm to use. enum: - - limit_override - - excluded - example: limit_override + - exact_fingerprint + - probabilistic + example: exact_fingerprint type: string x-enum-varnames: - - LIMIT_OVERRIDE - - EXCLUDED + - EXACT_FINGERPRINT + - PROBABILISTIC ObservabilityPipelineTagCardinalityLimitProcessorType: default: tag_cardinality_limit description: The processor type. The value must be `tag_cardinality_limit`. @@ -75913,6 +76064,149 @@ components: required: - type type: object + PrintReportRequest: + description: Request body for initiating a print-only report. + properties: + data: + $ref: "#/components/schemas/PrintReportRequestData" + required: + - data + type: object + PrintReportRequestAttributes: + description: |- + The configuration for a print-only report. Specify exactly one of `timeframe` (for a + relative time window) or both `from_ts` and `to_ts` (for an absolute time range). + properties: + from_ts: + description: |- + The start of an absolute time range, as a Unix timestamp in milliseconds. + Required when `timeframe` is omitted. + example: 1780318800000 + format: int64 + type: integer + resource_id: + description: The identifier of the dashboard or integration dashboard to render. + example: "abc-def-ghi" + type: string + resource_type: + $ref: "#/components/schemas/ReportScheduleResourceType" + template_variables: + description: The dashboard template variables applied when rendering the report. + items: + $ref: "#/components/schemas/ReportScheduleTemplateVariable" + type: array + timeframe: + description: |- + A relative time window (for example `1w` or `calendar_month`). Mutually + exclusive with `from_ts` and `to_ts`. + example: "1w" + type: string + timezone: + description: The IANA time zone identifier used to evaluate the time window. + example: "America/New_York" + type: string + to_ts: + description: |- + The end of an absolute time range, as a Unix timestamp in milliseconds. + Required when `timeframe` is omitted. + example: 1780923600000 + format: int64 + type: integer + required: + - resource_id + - resource_type + - timezone + - template_variables + type: object + PrintReportRequestData: + description: The JSON:API data object for a print report request. + properties: + attributes: + $ref: "#/components/schemas/PrintReportRequestAttributes" + type: + $ref: "#/components/schemas/PrintReportType" + required: + - type + - attributes + type: object + PrintReportResponse: + description: Response containing the initiated print-only report. + properties: + data: + $ref: "#/components/schemas/PrintReportResponseData" + required: + - data + type: object + PrintReportResponseAttributes: + description: The configuration and download URL for the initiated print-only report. + properties: + download_url: + description: The URL from which the rendered PDF report can be downloaded. + example: "https://app.datadoghq.com/..." + type: string + from_ts: + description: The start of the rendered time range, as a Unix timestamp in milliseconds. + example: 1780318800000 + format: int64 + type: integer + resource_id: + description: The identifier of the dashboard or integration dashboard. + example: "abc-def-ghi" + type: string + resource_type: + $ref: "#/components/schemas/ReportScheduleResourceType" + template_variables: + description: The dashboard template variables applied when rendering the report. + items: + $ref: "#/components/schemas/ReportScheduleTemplateVariable" + type: array + timeframe: + description: The relative time window used, if one was specified in the request. + example: "1w" + type: string + timezone: + description: The IANA time zone identifier used when rendering the report. + example: "America/New_York" + type: string + to_ts: + description: The end of the rendered time range, as a Unix timestamp in milliseconds. + example: 1780923600000 + format: int64 + type: integer + required: + - resource_id + - resource_type + - timezone + - template_variables + - from_ts + - to_ts + - download_url + type: object + PrintReportResponseData: + description: The JSON:API data object for a print-only report. + properties: + attributes: + $ref: "#/components/schemas/PrintReportResponseAttributes" + id: + description: The unique identifier of the report. + example: "11111111-2222-3333-4444-555555555555" + format: uuid + type: string + type: + $ref: "#/components/schemas/PrintReportType" + required: + - id + - type + - attributes + type: object + PrintReportType: + description: JSON:API resource type for a print-only report. + enum: + - report + example: report + type: string + x-enum-varnames: + - REPORT ProcessDataSource: default: process description: A data source for process-level infrastructure metrics. @@ -168146,6 +168440,167 @@ paths: summary: Update replay heatmap snapshot tags: - Rum Replay Heatmaps + /api/v2/reporting/dataset/{dataset_id}/schedules: + get: + description: |- + Retrieve all report schedules for a given published dataset. + Returns report schedules belonging to the authenticated user's organization that target the specified dataset. + Requires the `generate_log_reports` or `manage_log_reports` permission. + operationId: ListDatasetReportSchedules + parameters: + - description: The identifier of the published dataset to retrieve report schedules for. + example: "MW5vdGVib29rX2NlbGw6ZDI0ZTM2MWMtZDFlNC00NDYwLWIyOWUtNTg3YTczMzA3MDFm" + in: path + name: dataset_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + cell_id: "sevhjcis" + dataset_id: "MW5vdGVib29rX2NlbGw6ZDI0ZTM2MWMtZDFlNC00NDYwLWIyOWUtNTg3YTczMzA3MDFm" + description: "This is a scheduled notebook dataset report." + file_row_limit: 5000 + inline_row_limit: 10 + next_recurrence: 1725859200000 + notebook_id: 1 + recipients: + - "test@datadoghq.com" + resource_id: "aaaabbbb-1111-2222-3333-444455556666" + resource_type: widget_dataset_list + rrule: "DTSTART;TZID=America/New_York:20240912T090000\nRRULE:FREQ=DAILY;BYHOUR=9;BYMINUTE=0" + status: active + timeframe: "calendar_day" + timezone: "America/New_York" + title: "My Cool Dataset Report" + id: "e1234567-1234-1234-1234-123456789012" + relationships: + author: + data: + id: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + type: users + type: schedule + included: + - attributes: + email: "user@example.com" + name: "Example User" + id: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + type: users + schema: + $ref: "#/components/schemas/DatasetReportScheduleListResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List dataset report schedules + tags: + - Report Schedules + /api/v2/reporting/print: + post: + description: |- + Initiate a one-off, print-only report for a dashboard or integration dashboard. + The report is rendered as a PDF and made available for download through the URL returned in the response. + Requires a reporting permission appropriate to the targeted resource type. + operationId: PrintReport + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + resource_id: "abc-def-ghi" + resource_type: dashboard + template_variables: + - name: "env" + values: + - "prod" + timeframe: "1w" + timezone: "America/New_York" + type: report + schema: + $ref: "#/components/schemas/PrintReportRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + download_url: "https://app.datadoghq.com/..." + from_ts: 1780318800000 + resource_id: "abc-def-ghi" + resource_type: dashboard + template_variables: + - name: "env" + values: + - "prod" + timeframe: "1w" + timezone: "America/New_York" + to_ts: 1780923600000 + id: "11111111-2222-3333-4444-555555555555" + type: report + schema: + $ref: "#/components/schemas/PrintReportResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unprocessable Entity + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Print a report + tags: + - Report Schedules + x-codegen-request-body-name: body /api/v2/reporting/schedule: post: description: |- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 878b4c5b54..da5d6a5754 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -11575,6 +11575,34 @@ datadog\_api\_client.v2.model.dataset\_create\_request module :members: :show-inheritance: +datadog\_api\_client.v2.model.dataset\_report\_schedule\_list\_response module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.dataset_report_schedule_list_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dataset\_report\_schedule\_resource\_type module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.dataset_report_schedule_resource_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dataset\_report\_schedule\_response\_attributes module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.dataset_report_schedule_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dataset\_report\_schedule\_response\_data module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.dataset_report_schedule_response_data + :members: + :show-inheritance: + datadog\_api\_client.v2.model.dataset\_request module ----------------------------------------------------- @@ -29201,17 +29229,17 @@ datadog\_api\_client.v2.model.observability\_pipeline\_tag\_cardinality\_limit\_ :members: :show-inheritance: -datadog\_api\_client.v2.model.observability\_pipeline\_tag\_cardinality\_limit\_processor\_per\_metric\_limit module --------------------------------------------------------------------------------------------------------------------- +datadog\_api\_client.v2.model.observability\_pipeline\_tag\_cardinality\_limit\_processor\_override\_type module +---------------------------------------------------------------------------------------------------------------- -.. automodule:: datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_per_metric_limit +.. automodule:: datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_override_type :members: :show-inheritance: -datadog\_api\_client.v2.model.observability\_pipeline\_tag\_cardinality\_limit\_processor\_per\_metric\_mode module -------------------------------------------------------------------------------------------------------------------- +datadog\_api\_client.v2.model.observability\_pipeline\_tag\_cardinality\_limit\_processor\_per\_metric\_limit module +-------------------------------------------------------------------------------------------------------------------- -.. automodule:: datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_per_metric_mode +.. automodule:: datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_per_metric_limit :members: :show-inheritance: @@ -29222,10 +29250,17 @@ datadog\_api\_client.v2.model.observability\_pipeline\_tag\_cardinality\_limit\_ :members: :show-inheritance: -datadog\_api\_client.v2.model.observability\_pipeline\_tag\_cardinality\_limit\_processor\_per\_tag\_mode module +datadog\_api\_client.v2.model.observability\_pipeline\_tag\_cardinality\_limit\_processor\_tracking\_mode module ---------------------------------------------------------------------------------------------------------------- -.. automodule:: datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_per_tag_mode +.. automodule:: datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_tracking_mode + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.observability\_pipeline\_tag\_cardinality\_limit\_processor\_tracking\_mode\_mode module +---------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_tracking_mode_mode :members: :show-inheritance: @@ -31910,6 +31945,55 @@ datadog\_api\_client.v2.model.preview\_entity\_response\_data module :members: :show-inheritance: +datadog\_api\_client.v2.model.print\_report\_request module +----------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.print_report_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.print\_report\_request\_attributes module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.print_report_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.print\_report\_request\_data module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.print_report_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.print\_report\_response module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.print_report_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.print\_report\_response\_attributes module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.print_report_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.print\_report\_response\_data module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.print_report_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.print\_report\_type module +-------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.print_report_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.process\_data\_source module ---------------------------------------------------------- diff --git a/examples/v2/report-schedules/ListDatasetReportSchedules.py b/examples/v2/report-schedules/ListDatasetReportSchedules.py new file mode 100644 index 0000000000..703e4d5572 --- /dev/null +++ b/examples/v2/report-schedules/ListDatasetReportSchedules.py @@ -0,0 +1,15 @@ +""" +List dataset report schedules returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.report_schedules_api import ReportSchedulesApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ReportSchedulesApi(api_client) + response = api_instance.list_dataset_report_schedules( + dataset_id="dataset_id", + ) + + print(response) diff --git a/examples/v2/report-schedules/PrintReport.py b/examples/v2/report-schedules/PrintReport.py new file mode 100644 index 0000000000..424f299599 --- /dev/null +++ b/examples/v2/report-schedules/PrintReport.py @@ -0,0 +1,41 @@ +""" +Print a report returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.report_schedules_api import ReportSchedulesApi +from datadog_api_client.v2.model.print_report_request import PrintReportRequest +from datadog_api_client.v2.model.print_report_request_attributes import PrintReportRequestAttributes +from datadog_api_client.v2.model.print_report_request_data import PrintReportRequestData +from datadog_api_client.v2.model.print_report_type import PrintReportType +from datadog_api_client.v2.model.report_schedule_resource_type import ReportScheduleResourceType +from datadog_api_client.v2.model.report_schedule_template_variable import ReportScheduleTemplateVariable + +body = PrintReportRequest( + data=PrintReportRequestData( + attributes=PrintReportRequestAttributes( + from_ts=1780318800000, + resource_id="abc-def-ghi", + resource_type=ReportScheduleResourceType.DASHBOARD, + template_variables=[ + ReportScheduleTemplateVariable( + name="env", + values=[ + "prod", + ], + ), + ], + timeframe="1w", + timezone="America/New_York", + to_ts=1780923600000, + ), + type=PrintReportType.REPORT, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ReportSchedulesApi(api_client) + response = api_instance.print_report(body=body) + + print(response) diff --git a/src/datadog_api_client/v2/api/report_schedules_api.py b/src/datadog_api_client/v2/api/report_schedules_api.py index 3d473cf767..fa38696f47 100644 --- a/src/datadog_api_client/v2/api/report_schedules_api.py +++ b/src/datadog_api_client/v2/api/report_schedules_api.py @@ -12,6 +12,9 @@ unset, UUID, ) +from datadog_api_client.v2.model.dataset_report_schedule_list_response import DatasetReportScheduleListResponse +from datadog_api_client.v2.model.print_report_response import PrintReportResponse +from datadog_api_client.v2.model.print_report_request import PrintReportRequest from datadog_api_client.v2.model.report_schedule_response import ReportScheduleResponse from datadog_api_client.v2.model.report_schedule_create_request import ReportScheduleCreateRequest from datadog_api_client.v2.model.report_schedule_list_response import ReportScheduleListResponse @@ -127,6 +130,29 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_dataset_report_schedules_endpoint = _Endpoint( + settings={ + "response_type": (DatasetReportScheduleListResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/reporting/dataset/{dataset_id}/schedules", + "operation_id": "list_dataset_report_schedules", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "dataset_id": { + "required": True, + "openapi_types": (str,), + "attribute": "dataset_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._list_report_schedules_endpoint = _Endpoint( settings={ "response_type": (ReportScheduleListResponse,), @@ -202,6 +228,26 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._print_report_endpoint = _Endpoint( + settings={ + "response_type": (PrintReportResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/reporting/print", + "operation_id": "print_report", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (PrintReportRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._toggle_report_schedule_endpoint = _Endpoint( settings={ "response_type": (ReportScheduleResponse,), @@ -306,6 +352,25 @@ def get_report_schedules_for_resource( return self._get_report_schedules_for_resource_endpoint.call_with_http_info(**kwargs) + def list_dataset_report_schedules( + self, + dataset_id: str, + ) -> DatasetReportScheduleListResponse: + """List dataset report schedules. + + Retrieve all report schedules for a given published dataset. + Returns report schedules belonging to the authenticated user's organization that target the specified dataset. + Requires the ``generate_log_reports`` or ``manage_log_reports`` permission. + + :param dataset_id: The identifier of the published dataset to retrieve report schedules for. + :type dataset_id: str + :rtype: DatasetReportScheduleListResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["dataset_id"] = dataset_id + + return self._list_dataset_report_schedules_endpoint.call_with_http_info(**kwargs) + def list_report_schedules( self, *, @@ -375,6 +440,24 @@ def patch_report_schedule( return self._patch_report_schedule_endpoint.call_with_http_info(**kwargs) + def print_report( + self, + body: PrintReportRequest, + ) -> PrintReportResponse: + """Print a report. + + Initiate a one-off, print-only report for a dashboard or integration dashboard. + The report is rendered as a PDF and made available for download through the URL returned in the response. + Requires a reporting permission appropriate to the targeted resource type. + + :type body: PrintReportRequest + :rtype: PrintReportResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._print_report_endpoint.call_with_http_info(**kwargs) + def toggle_report_schedule( self, schedule_uuid: UUID, diff --git a/src/datadog_api_client/v2/model/dataset_report_schedule_list_response.py b/src/datadog_api_client/v2/model/dataset_report_schedule_list_response.py new file mode 100644 index 0000000000..4b70bdd584 --- /dev/null +++ b/src/datadog_api_client/v2/model/dataset_report_schedule_list_response.py @@ -0,0 +1,60 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dataset_report_schedule_response_data import DatasetReportScheduleResponseData + from datadog_api_client.v2.model.report_schedule_included_resource import ReportScheduleIncludedResource + from datadog_api_client.v2.model.report_schedule_author import ReportScheduleAuthor + from datadog_api_client.v2.model.report_schedule_resource import ReportScheduleResource + + +class DatasetReportScheduleListResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dataset_report_schedule_response_data import DatasetReportScheduleResponseData + from datadog_api_client.v2.model.report_schedule_included_resource import ReportScheduleIncludedResource + + return { + "data": ([DatasetReportScheduleResponseData],), + "included": ([ReportScheduleIncludedResource],), + } + + attribute_map = { + "data": "data", + "included": "included", + } + + def __init__( + self_, + data: List[DatasetReportScheduleResponseData], + included: Union[ + List[Union[ReportScheduleIncludedResource, ReportScheduleAuthor, ReportScheduleResource]], UnsetType + ] = unset, + **kwargs, + ): + """ + Response containing a list of report schedules for a published dataset. + + :param data: A list of report schedules for the dataset. + :type data: [DatasetReportScheduleResponseData] + + :param included: Related resources included with the report schedules, such as authors. + :type included: [ReportScheduleIncludedResource], optional + """ + if included is not unset: + kwargs["included"] = included + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/dataset_report_schedule_resource_type.py b/src/datadog_api_client/v2/model/dataset_report_schedule_resource_type.py new file mode 100644 index 0000000000..a7491549e8 --- /dev/null +++ b/src/datadog_api_client/v2/model/dataset_report_schedule_resource_type.py @@ -0,0 +1,35 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DatasetReportScheduleResourceType(ModelSimple): + """ + The type of resource targeted by a dataset report schedule. + + :param value: If omitted defaults to "widget_dataset_list". Must be one of ["widget_dataset_list"]. + :type value: str + """ + + allowed_values = { + "widget_dataset_list", + } + WIDGET_DATASET_LIST: ClassVar["DatasetReportScheduleResourceType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DatasetReportScheduleResourceType.WIDGET_DATASET_LIST = DatasetReportScheduleResourceType("widget_dataset_list") diff --git a/src/datadog_api_client/v2/model/dataset_report_schedule_response_attributes.py b/src/datadog_api_client/v2/model/dataset_report_schedule_response_attributes.py new file mode 100644 index 0000000000..baf38a7c0a --- /dev/null +++ b/src/datadog_api_client/v2/model/dataset_report_schedule_response_attributes.py @@ -0,0 +1,147 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dataset_report_schedule_resource_type import DatasetReportScheduleResourceType + from datadog_api_client.v2.model.report_schedule_status import ReportScheduleStatus + + +class DatasetReportScheduleResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dataset_report_schedule_resource_type import DatasetReportScheduleResourceType + from datadog_api_client.v2.model.report_schedule_status import ReportScheduleStatus + + return { + "cell_id": (str, none_type), + "dataset_id": (str, none_type), + "description": (str,), + "file_row_limit": (int, none_type), + "inline_row_limit": (int, none_type), + "next_recurrence": (int, none_type), + "notebook_id": (int, none_type), + "recipients": ([str],), + "resource_id": (str,), + "resource_type": (DatasetReportScheduleResourceType,), + "rrule": (str,), + "status": (ReportScheduleStatus,), + "timeframe": (str,), + "timezone": (str,), + "title": (str,), + } + + attribute_map = { + "cell_id": "cell_id", + "dataset_id": "dataset_id", + "description": "description", + "file_row_limit": "file_row_limit", + "inline_row_limit": "inline_row_limit", + "next_recurrence": "next_recurrence", + "notebook_id": "notebook_id", + "recipients": "recipients", + "resource_id": "resource_id", + "resource_type": "resource_type", + "rrule": "rrule", + "status": "status", + "timeframe": "timeframe", + "timezone": "timezone", + "title": "title", + } + + def __init__( + self_, + cell_id: Union[str, none_type], + dataset_id: Union[str, none_type], + description: str, + file_row_limit: Union[int, none_type], + inline_row_limit: Union[int, none_type], + next_recurrence: Union[int, none_type], + notebook_id: Union[int, none_type], + recipients: List[str], + resource_id: str, + resource_type: DatasetReportScheduleResourceType, + rrule: str, + status: ReportScheduleStatus, + timeframe: str, + timezone: str, + title: str, + **kwargs, + ): + """ + The configuration and derived state of a report schedule for a published dataset. + + :param cell_id: The identifier of the notebook cell that published the dataset, or ``null`` if not set. + :type cell_id: str, none_type + + :param dataset_id: The identifier of the dataset, or ``null`` if not set. + :type dataset_id: str, none_type + + :param description: The description of the report. + :type description: str + + :param file_row_limit: The maximum number of rows included in the attached CSV file, or ``null`` if not set. + :type file_row_limit: int, none_type + + :param inline_row_limit: The maximum number of rows included inline in the email body, or ``null`` if not set. + :type inline_row_limit: int, none_type + + :param next_recurrence: The Unix timestamp, in milliseconds, of the next scheduled delivery, or + ``null`` if none is scheduled. + :type next_recurrence: int, none_type + + :param notebook_id: The identifier of the notebook containing the dataset cell, or ``null`` if not set. + :type notebook_id: int, none_type + + :param recipients: The recipients of the report (email addresses, Slack channel references, or + Microsoft Teams channel references). + :type recipients: [str] + + :param resource_id: The identifier of the widget containing the dataset. + :type resource_id: str + + :param resource_type: The type of resource targeted by a dataset report schedule. + :type resource_type: DatasetReportScheduleResourceType + + :param rrule: The recurrence rule for the schedule, expressed as an iCalendar ``RRULE`` string. + :type rrule: str + + :param status: Whether the schedule is currently delivering reports ( ``active`` ) or paused ( ``inactive`` ). + :type status: ReportScheduleStatus + + :param timeframe: The relative timeframe of data included in the report. + :type timeframe: str + + :param timezone: The IANA time zone identifier the recurrence rule is evaluated in. + :type timezone: str + + :param title: The title of the report. + :type title: str + """ + super().__init__(kwargs) + + self_.cell_id = cell_id + self_.dataset_id = dataset_id + self_.description = description + self_.file_row_limit = file_row_limit + self_.inline_row_limit = inline_row_limit + self_.next_recurrence = next_recurrence + self_.notebook_id = notebook_id + self_.recipients = recipients + self_.resource_id = resource_id + self_.resource_type = resource_type + self_.rrule = rrule + self_.status = status + self_.timeframe = timeframe + self_.timezone = timezone + self_.title = title diff --git a/src/datadog_api_client/v2/model/dataset_report_schedule_response_data.py b/src/datadog_api_client/v2/model/dataset_report_schedule_response_data.py new file mode 100644 index 0000000000..fafbe89197 --- /dev/null +++ b/src/datadog_api_client/v2/model/dataset_report_schedule_response_data.py @@ -0,0 +1,76 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dataset_report_schedule_response_attributes import ( + DatasetReportScheduleResponseAttributes, + ) + from datadog_api_client.v2.model.report_schedule_response_relationships import ReportScheduleResponseRelationships + from datadog_api_client.v2.model.report_schedule_type import ReportScheduleType + + +class DatasetReportScheduleResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dataset_report_schedule_response_attributes import ( + DatasetReportScheduleResponseAttributes, + ) + from datadog_api_client.v2.model.report_schedule_response_relationships import ( + ReportScheduleResponseRelationships, + ) + from datadog_api_client.v2.model.report_schedule_type import ReportScheduleType + + return { + "attributes": (DatasetReportScheduleResponseAttributes,), + "id": (UUID,), + "relationships": (ReportScheduleResponseRelationships,), + "type": (ReportScheduleType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "relationships": "relationships", + "type": "type", + } + + def __init__( + self_, + attributes: DatasetReportScheduleResponseAttributes, + id: UUID, + relationships: ReportScheduleResponseRelationships, + type: ReportScheduleType, + **kwargs, + ): + """ + The JSON:API data object representing a dataset report schedule. + + :param attributes: The configuration and derived state of a report schedule for a published dataset. + :type attributes: DatasetReportScheduleResponseAttributes + + :param id: The unique identifier of the dataset report schedule. + :type id: UUID + + :param relationships: Relationships for the report schedule. + :type relationships: ReportScheduleResponseRelationships + + :param type: JSON:API resource type for report schedules. + :type type: ReportScheduleType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.relationships = relationships + self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_config_processor_item.py b/src/datadog_api_client/v2/model/observability_pipeline_config_processor_item.py index 434095b861..9c63576030 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_config_processor_item.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_config_processor_item.py @@ -162,6 +162,9 @@ def __init__(self, **kwargs): :param per_metric_limits: A list of per-metric cardinality overrides that take precedence over the default `value_limit`. :type per_metric_limits: [ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit], optional + :param tracking_mode: Controls whether the processor uses exact or probabilistic tag tracking. + :type tracking_mode: ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode + :param value_limit: The default maximum number of distinct tag value combinations allowed per metric. :type value_limit: int """ diff --git a/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor.py index 54462a1881..e2f7bd7dd4 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor.py @@ -20,6 +20,9 @@ from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_per_metric_limit import ( ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit, ) + from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_tracking_mode import ( + ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode, + ) from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_type import ( ObservabilityPipelineTagCardinalityLimitProcessorType, ) @@ -44,6 +47,9 @@ def openapi_types(_): from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_per_metric_limit import ( ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit, ) + from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_tracking_mode import ( + ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode, + ) from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_type import ( ObservabilityPipelineTagCardinalityLimitProcessorType, ) @@ -55,6 +61,7 @@ def openapi_types(_): "include": (str,), "limit_exceeded_action": (ObservabilityPipelineTagCardinalityLimitProcessorAction,), "per_metric_limits": ([ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit],), + "tracking_mode": (ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode,), "type": (ObservabilityPipelineTagCardinalityLimitProcessorType,), "value_limit": (int,), } @@ -66,6 +73,7 @@ def openapi_types(_): "include": "include", "limit_exceeded_action": "limit_exceeded_action", "per_metric_limits": "per_metric_limits", + "tracking_mode": "tracking_mode", "type": "type", "value_limit": "value_limit", } @@ -76,6 +84,7 @@ def __init__( id: str, include: str, limit_exceeded_action: ObservabilityPipelineTagCardinalityLimitProcessorAction, + tracking_mode: ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode, type: ObservabilityPipelineTagCardinalityLimitProcessorType, value_limit: int, display_name: Union[str, UnsetType] = unset, @@ -107,6 +116,9 @@ def __init__( :param per_metric_limits: A list of per-metric cardinality overrides that take precedence over the default ``value_limit``. :type per_metric_limits: [ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit], optional + :param tracking_mode: Controls whether the processor uses exact or probabilistic tag tracking. + :type tracking_mode: ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode + :param type: The processor type. The value must be ``tag_cardinality_limit``. :type type: ObservabilityPipelineTagCardinalityLimitProcessorType @@ -123,5 +135,6 @@ def __init__( self_.id = id self_.include = include self_.limit_exceeded_action = limit_exceeded_action + self_.tracking_mode = tracking_mode self_.type = type self_.value_limit = value_limit diff --git a/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_per_tag_mode.py b/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_override_type.py similarity index 57% rename from src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_per_tag_mode.py rename to src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_override_type.py index c49352f06e..6049f919c1 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_per_tag_mode.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_override_type.py @@ -12,9 +12,9 @@ from typing import ClassVar -class ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode(ModelSimple): +class ObservabilityPipelineTagCardinalityLimitProcessorOverrideType(ModelSimple): """ - How the per-tag override is applied. `limit_override` enforces a custom limit on the tag; `excluded` skips the tag from cardinality tracking. + How the override is applied. `limit_override` enforces a custom limit; `excluded` omits the metric or tag from cardinality tracking. :param value: Must be one of ["limit_override", "excluded"]. :type value: str @@ -24,8 +24,8 @@ class ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode(ModelSimple): "limit_override", "excluded", } - LIMIT_OVERRIDE: ClassVar["ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode"] - EXCLUDED: ClassVar["ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode"] + LIMIT_OVERRIDE: ClassVar["ObservabilityPipelineTagCardinalityLimitProcessorOverrideType"] + EXCLUDED: ClassVar["ObservabilityPipelineTagCardinalityLimitProcessorOverrideType"] @cached_property def openapi_types(_): @@ -34,9 +34,9 @@ def openapi_types(_): } -ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode.LIMIT_OVERRIDE = ( - ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode("limit_override") +ObservabilityPipelineTagCardinalityLimitProcessorOverrideType.LIMIT_OVERRIDE = ( + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType("limit_override") ) -ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode.EXCLUDED = ( - ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode("excluded") +ObservabilityPipelineTagCardinalityLimitProcessorOverrideType.EXCLUDED = ( + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType("excluded") ) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_per_metric_limit.py b/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_per_metric_limit.py index b366fdd408..223a49329c 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_per_metric_limit.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_per_metric_limit.py @@ -17,8 +17,8 @@ from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_action import ( ObservabilityPipelineTagCardinalityLimitProcessorAction, ) - from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_per_metric_mode import ( - ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode, + from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_override_type import ( + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType, ) from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_per_tag_limit import ( ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit, @@ -41,8 +41,8 @@ def openapi_types(_): from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_action import ( ObservabilityPipelineTagCardinalityLimitProcessorAction, ) - from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_per_metric_mode import ( - ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode, + from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_override_type import ( + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType, ) from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_per_tag_limit import ( ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit, @@ -51,7 +51,7 @@ def openapi_types(_): return { "limit_exceeded_action": (ObservabilityPipelineTagCardinalityLimitProcessorAction,), "metric_name": (str,), - "mode": (ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode,), + "override_type": (ObservabilityPipelineTagCardinalityLimitProcessorOverrideType,), "per_tag_limits": ([ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit],), "value_limit": (int,), } @@ -59,7 +59,7 @@ def openapi_types(_): attribute_map = { "limit_exceeded_action": "limit_exceeded_action", "metric_name": "metric_name", - "mode": "mode", + "override_type": "override_type", "per_tag_limits": "per_tag_limits", "value_limit": "value_limit", } @@ -67,7 +67,7 @@ def openapi_types(_): def __init__( self_, metric_name: str, - mode: ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode, + override_type: ObservabilityPipelineTagCardinalityLimitProcessorOverrideType, limit_exceeded_action: Union[ObservabilityPipelineTagCardinalityLimitProcessorAction, UnsetType] = unset, per_tag_limits: Union[List[ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit], UnsetType] = unset, value_limit: Union[int, UnsetType] = unset, @@ -82,13 +82,13 @@ def __init__( :param metric_name: The name of the metric this override applies to. :type metric_name: str - :param mode: How the per-metric override is applied. ``tracked`` enforces a custom limit; ``excluded`` skips the metric entirely. - :type mode: ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode + :param override_type: How the override is applied. ``limit_override`` enforces a custom limit; ``excluded`` omits the metric or tag from cardinality tracking. + :type override_type: ObservabilityPipelineTagCardinalityLimitProcessorOverrideType - :param per_tag_limits: A list of per-tag cardinality overrides that apply within this metric. Must be omitted when ``mode`` is ``excluded``. + :param per_tag_limits: A list of per-tag cardinality overrides that apply within this metric. Must be omitted when ``override_type`` is ``excluded``. :type per_tag_limits: [ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit], optional - :param value_limit: The maximum number of distinct tag value combinations allowed for this metric. Required when ``mode`` is ``tracked``. Must be omitted when ``mode`` is ``excluded``. + :param value_limit: The maximum number of distinct tag value combinations allowed for this metric. Required when ``override_type`` is ``limit_override``. Must be omitted when ``override_type`` is ``excluded``. :type value_limit: int, optional """ if limit_exceeded_action is not unset: @@ -100,4 +100,4 @@ def __init__( super().__init__(kwargs) self_.metric_name = metric_name - self_.mode = mode + self_.override_type = override_type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_per_metric_mode.py b/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_per_metric_mode.py deleted file mode 100644 index 31534c0c16..0000000000 --- a/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_per_metric_mode.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode(ModelSimple): - """ - How the per-metric override is applied. `tracked` enforces a custom limit; `excluded` skips the metric entirely. - - :param value: Must be one of ["tracked", "excluded"]. - :type value: str - """ - - allowed_values = { - "tracked", - "excluded", - } - TRACKED: ClassVar["ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode"] - EXCLUDED: ClassVar["ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode.TRACKED = ( - ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode("tracked") -) -ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode.EXCLUDED = ( - ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode("excluded") -) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_per_tag_limit.py b/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_per_tag_limit.py index e50a85ced7..c2a9d71cf9 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_per_tag_limit.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_per_tag_limit.py @@ -14,8 +14,8 @@ if TYPE_CHECKING: - from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_per_tag_mode import ( - ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode, + from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_override_type import ( + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType, ) @@ -29,25 +29,25 @@ class ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit(ModelNormal): @cached_property def openapi_types(_): - from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_per_tag_mode import ( - ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode, + from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_override_type import ( + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType, ) return { - "mode": (ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode,), + "override_type": (ObservabilityPipelineTagCardinalityLimitProcessorOverrideType,), "tag_key": (str,), "value_limit": (int,), } attribute_map = { - "mode": "mode", + "override_type": "override_type", "tag_key": "tag_key", "value_limit": "value_limit", } def __init__( self_, - mode: ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode, + override_type: ObservabilityPipelineTagCardinalityLimitProcessorOverrideType, tag_key: str, value_limit: Union[int, UnsetType] = unset, **kwargs, @@ -55,18 +55,18 @@ def __init__( """ A cardinality override for a specific tag key within a per-metric limit. - :param mode: How the per-tag override is applied. ``limit_override`` enforces a custom limit on the tag; ``excluded`` skips the tag from cardinality tracking. - :type mode: ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode + :param override_type: How the override is applied. ``limit_override`` enforces a custom limit; ``excluded`` omits the metric or tag from cardinality tracking. + :type override_type: ObservabilityPipelineTagCardinalityLimitProcessorOverrideType :param tag_key: The tag key this override applies to. :type tag_key: str - :param value_limit: The maximum number of distinct values allowed for this tag. Required when ``mode`` is ``limit_override``. Must be omitted when ``mode`` is ``excluded``. + :param value_limit: The maximum number of distinct values allowed for this tag. Required when ``override_type`` is ``limit_override``. Must be omitted when ``override_type`` is ``excluded``. :type value_limit: int, optional """ if value_limit is not unset: kwargs["value_limit"] = value_limit super().__init__(kwargs) - self_.mode = mode + self_.override_type = override_type self_.tag_key = tag_key diff --git a/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_tracking_mode.py b/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_tracking_mode.py new file mode 100644 index 0000000000..215e99ebc9 --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_tracking_mode.py @@ -0,0 +1,44 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_tracking_mode_mode import ( + ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode, + ) + + +class ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_tracking_mode_mode import ( + ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode, + ) + + return { + "mode": (ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode,), + } + + attribute_map = { + "mode": "mode", + } + + def __init__(self_, mode: ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode, **kwargs): + """ + Controls whether the processor uses exact or probabilistic tag tracking. + + :param mode: The cardinality tracking algorithm to use. + :type mode: ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode + """ + super().__init__(kwargs) + + self_.mode = mode diff --git a/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_tracking_mode_mode.py b/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_tracking_mode_mode.py new file mode 100644 index 0000000000..a0ac0a23ef --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_tag_cardinality_limit_processor_tracking_mode_mode.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode(ModelSimple): + """ + The cardinality tracking algorithm to use. + + :param value: Must be one of ["exact_fingerprint", "probabilistic"]. + :type value: str + """ + + allowed_values = { + "exact_fingerprint", + "probabilistic", + } + EXACT_FINGERPRINT: ClassVar["ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode"] + PROBABILISTIC: ClassVar["ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode.EXACT_FINGERPRINT = ( + ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode("exact_fingerprint") +) +ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode.PROBABILISTIC = ( + ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode("probabilistic") +) diff --git a/src/datadog_api_client/v2/model/print_report_request.py b/src/datadog_api_client/v2/model/print_report_request.py new file mode 100644 index 0000000000..db97e4861a --- /dev/null +++ b/src/datadog_api_client/v2/model/print_report_request.py @@ -0,0 +1,40 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.print_report_request_data import PrintReportRequestData + + +class PrintReportRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.print_report_request_data import PrintReportRequestData + + return { + "data": (PrintReportRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: PrintReportRequestData, **kwargs): + """ + Request body for initiating a print-only report. + + :param data: The JSON:API data object for a print report request. + :type data: PrintReportRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/print_report_request_attributes.py b/src/datadog_api_client/v2/model/print_report_request_attributes.py new file mode 100644 index 0000000000..816888d0ec --- /dev/null +++ b/src/datadog_api_client/v2/model/print_report_request_attributes.py @@ -0,0 +1,97 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.report_schedule_resource_type import ReportScheduleResourceType + from datadog_api_client.v2.model.report_schedule_template_variable import ReportScheduleTemplateVariable + + +class PrintReportRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.report_schedule_resource_type import ReportScheduleResourceType + from datadog_api_client.v2.model.report_schedule_template_variable import ReportScheduleTemplateVariable + + return { + "from_ts": (int,), + "resource_id": (str,), + "resource_type": (ReportScheduleResourceType,), + "template_variables": ([ReportScheduleTemplateVariable],), + "timeframe": (str,), + "timezone": (str,), + "to_ts": (int,), + } + + attribute_map = { + "from_ts": "from_ts", + "resource_id": "resource_id", + "resource_type": "resource_type", + "template_variables": "template_variables", + "timeframe": "timeframe", + "timezone": "timezone", + "to_ts": "to_ts", + } + + def __init__( + self_, + resource_id: str, + resource_type: ReportScheduleResourceType, + template_variables: List[ReportScheduleTemplateVariable], + timezone: str, + from_ts: Union[int, UnsetType] = unset, + timeframe: Union[str, UnsetType] = unset, + to_ts: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + The configuration for a print-only report. Specify exactly one of ``timeframe`` (for a + relative time window) or both ``from_ts`` and ``to_ts`` (for an absolute time range). + + :param from_ts: The start of an absolute time range, as a Unix timestamp in milliseconds. + Required when ``timeframe`` is omitted. + :type from_ts: int, optional + + :param resource_id: The identifier of the dashboard or integration dashboard to render. + :type resource_id: str + + :param resource_type: The type of dashboard resource the report schedule targets. + :type resource_type: ReportScheduleResourceType + + :param template_variables: The dashboard template variables applied when rendering the report. + :type template_variables: [ReportScheduleTemplateVariable] + + :param timeframe: A relative time window (for example ``1w`` or ``calendar_month`` ). Mutually + exclusive with ``from_ts`` and ``to_ts``. + :type timeframe: str, optional + + :param timezone: The IANA time zone identifier used to evaluate the time window. + :type timezone: str + + :param to_ts: The end of an absolute time range, as a Unix timestamp in milliseconds. + Required when ``timeframe`` is omitted. + :type to_ts: int, optional + """ + if from_ts is not unset: + kwargs["from_ts"] = from_ts + if timeframe is not unset: + kwargs["timeframe"] = timeframe + if to_ts is not unset: + kwargs["to_ts"] = to_ts + super().__init__(kwargs) + + self_.resource_id = resource_id + self_.resource_type = resource_type + self_.template_variables = template_variables + self_.timezone = timezone diff --git a/src/datadog_api_client/v2/model/print_report_request_data.py b/src/datadog_api_client/v2/model/print_report_request_data.py new file mode 100644 index 0000000000..2581921723 --- /dev/null +++ b/src/datadog_api_client/v2/model/print_report_request_data.py @@ -0,0 +1,49 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.print_report_request_attributes import PrintReportRequestAttributes + from datadog_api_client.v2.model.print_report_type import PrintReportType + + +class PrintReportRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.print_report_request_attributes import PrintReportRequestAttributes + from datadog_api_client.v2.model.print_report_type import PrintReportType + + return { + "attributes": (PrintReportRequestAttributes,), + "type": (PrintReportType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: PrintReportRequestAttributes, type: PrintReportType, **kwargs): + """ + The JSON:API data object for a print report request. + + :param attributes: The configuration for a print-only report. Specify exactly one of ``timeframe`` (for a + relative time window) or both ``from_ts`` and ``to_ts`` (for an absolute time range). + :type attributes: PrintReportRequestAttributes + + :param type: JSON:API resource type for a print-only report. + :type type: PrintReportType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/print_report_response.py b/src/datadog_api_client/v2/model/print_report_response.py new file mode 100644 index 0000000000..68249da74b --- /dev/null +++ b/src/datadog_api_client/v2/model/print_report_response.py @@ -0,0 +1,40 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.print_report_response_data import PrintReportResponseData + + +class PrintReportResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.print_report_response_data import PrintReportResponseData + + return { + "data": (PrintReportResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: PrintReportResponseData, **kwargs): + """ + Response containing the initiated print-only report. + + :param data: The JSON:API data object for a print-only report. + :type data: PrintReportResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/print_report_response_attributes.py b/src/datadog_api_client/v2/model/print_report_response_attributes.py new file mode 100644 index 0000000000..1f25d2ea3d --- /dev/null +++ b/src/datadog_api_client/v2/model/print_report_response_attributes.py @@ -0,0 +1,98 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.report_schedule_resource_type import ReportScheduleResourceType + from datadog_api_client.v2.model.report_schedule_template_variable import ReportScheduleTemplateVariable + + +class PrintReportResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.report_schedule_resource_type import ReportScheduleResourceType + from datadog_api_client.v2.model.report_schedule_template_variable import ReportScheduleTemplateVariable + + return { + "download_url": (str,), + "from_ts": (int,), + "resource_id": (str,), + "resource_type": (ReportScheduleResourceType,), + "template_variables": ([ReportScheduleTemplateVariable],), + "timeframe": (str,), + "timezone": (str,), + "to_ts": (int,), + } + + attribute_map = { + "download_url": "download_url", + "from_ts": "from_ts", + "resource_id": "resource_id", + "resource_type": "resource_type", + "template_variables": "template_variables", + "timeframe": "timeframe", + "timezone": "timezone", + "to_ts": "to_ts", + } + + def __init__( + self_, + download_url: str, + from_ts: int, + resource_id: str, + resource_type: ReportScheduleResourceType, + template_variables: List[ReportScheduleTemplateVariable], + timezone: str, + to_ts: int, + timeframe: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The configuration and download URL for the initiated print-only report. + + :param download_url: The URL from which the rendered PDF report can be downloaded. + :type download_url: str + + :param from_ts: The start of the rendered time range, as a Unix timestamp in milliseconds. + :type from_ts: int + + :param resource_id: The identifier of the dashboard or integration dashboard. + :type resource_id: str + + :param resource_type: The type of dashboard resource the report schedule targets. + :type resource_type: ReportScheduleResourceType + + :param template_variables: The dashboard template variables applied when rendering the report. + :type template_variables: [ReportScheduleTemplateVariable] + + :param timeframe: The relative time window used, if one was specified in the request. + :type timeframe: str, optional + + :param timezone: The IANA time zone identifier used when rendering the report. + :type timezone: str + + :param to_ts: The end of the rendered time range, as a Unix timestamp in milliseconds. + :type to_ts: int + """ + if timeframe is not unset: + kwargs["timeframe"] = timeframe + super().__init__(kwargs) + + self_.download_url = download_url + self_.from_ts = from_ts + self_.resource_id = resource_id + self_.resource_type = resource_type + self_.template_variables = template_variables + self_.timezone = timezone + self_.to_ts = to_ts diff --git a/src/datadog_api_client/v2/model/print_report_response_data.py b/src/datadog_api_client/v2/model/print_report_response_data.py new file mode 100644 index 0000000000..82d2ca319b --- /dev/null +++ b/src/datadog_api_client/v2/model/print_report_response_data.py @@ -0,0 +1,55 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.print_report_response_attributes import PrintReportResponseAttributes + from datadog_api_client.v2.model.print_report_type import PrintReportType + + +class PrintReportResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.print_report_response_attributes import PrintReportResponseAttributes + from datadog_api_client.v2.model.print_report_type import PrintReportType + + return { + "attributes": (PrintReportResponseAttributes,), + "id": (UUID,), + "type": (PrintReportType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: PrintReportResponseAttributes, id: UUID, type: PrintReportType, **kwargs): + """ + The JSON:API data object for a print-only report. + + :param attributes: The configuration and download URL for the initiated print-only report. + :type attributes: PrintReportResponseAttributes + + :param id: The unique identifier of the report. + :type id: UUID + + :param type: JSON:API resource type for a print-only report. + :type type: PrintReportType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/print_report_type.py b/src/datadog_api_client/v2/model/print_report_type.py new file mode 100644 index 0000000000..94c1df6277 --- /dev/null +++ b/src/datadog_api_client/v2/model/print_report_type.py @@ -0,0 +1,35 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class PrintReportType(ModelSimple): + """ + JSON:API resource type for a print-only report. + + :param value: If omitted defaults to "report". Must be one of ["report"]. + :type value: str + """ + + allowed_values = { + "report", + } + REPORT: ClassVar["PrintReportType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +PrintReportType.REPORT = PrintReportType("report") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 72cf21929b..9150ec9563 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -2229,6 +2229,12 @@ from datadog_api_client.v2.model.dataset_attributes_request import DatasetAttributesRequest from datadog_api_client.v2.model.dataset_attributes_response import DatasetAttributesResponse from datadog_api_client.v2.model.dataset_create_request import DatasetCreateRequest +from datadog_api_client.v2.model.dataset_report_schedule_list_response import DatasetReportScheduleListResponse +from datadog_api_client.v2.model.dataset_report_schedule_resource_type import DatasetReportScheduleResourceType +from datadog_api_client.v2.model.dataset_report_schedule_response_attributes import ( + DatasetReportScheduleResponseAttributes, +) +from datadog_api_client.v2.model.dataset_report_schedule_response_data import DatasetReportScheduleResponseData from datadog_api_client.v2.model.dataset_request import DatasetRequest from datadog_api_client.v2.model.dataset_response import DatasetResponse from datadog_api_client.v2.model.dataset_response_multi import DatasetResponseMulti @@ -5924,17 +5930,20 @@ from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_action import ( ObservabilityPipelineTagCardinalityLimitProcessorAction, ) +from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_override_type import ( + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType, +) from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_per_metric_limit import ( ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit, ) -from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_per_metric_mode import ( - ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode, -) from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_per_tag_limit import ( ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit, ) -from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_per_tag_mode import ( - ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode, +from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_tracking_mode import ( + ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode, +) +from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_tracking_mode_mode import ( + ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode, ) from datadog_api_client.v2.model.observability_pipeline_tag_cardinality_limit_processor_type import ( ObservabilityPipelineTagCardinalityLimitProcessorType, @@ -6402,6 +6411,13 @@ from datadog_api_client.v2.model.powerpacks_response_meta import PowerpacksResponseMeta from datadog_api_client.v2.model.powerpacks_response_meta_pagination import PowerpacksResponseMetaPagination from datadog_api_client.v2.model.preview_entity_response_data import PreviewEntityResponseData +from datadog_api_client.v2.model.print_report_request import PrintReportRequest +from datadog_api_client.v2.model.print_report_request_attributes import PrintReportRequestAttributes +from datadog_api_client.v2.model.print_report_request_data import PrintReportRequestData +from datadog_api_client.v2.model.print_report_response import PrintReportResponse +from datadog_api_client.v2.model.print_report_response_attributes import PrintReportResponseAttributes +from datadog_api_client.v2.model.print_report_response_data import PrintReportResponseData +from datadog_api_client.v2.model.print_report_type import PrintReportType from datadog_api_client.v2.model.process_data_source import ProcessDataSource from datadog_api_client.v2.model.process_scalar_query import ProcessScalarQuery from datadog_api_client.v2.model.process_summaries_meta import ProcessSummariesMeta @@ -11389,6 +11405,10 @@ "DatasetAttributesRequest", "DatasetAttributesResponse", "DatasetCreateRequest", + "DatasetReportScheduleListResponse", + "DatasetReportScheduleResourceType", + "DatasetReportScheduleResponseAttributes", + "DatasetReportScheduleResponseData", "DatasetRequest", "DatasetResponse", "DatasetResponseMulti", @@ -13878,10 +13898,11 @@ "ObservabilityPipelineSyslogSourceMode", "ObservabilityPipelineTagCardinalityLimitProcessor", "ObservabilityPipelineTagCardinalityLimitProcessorAction", + "ObservabilityPipelineTagCardinalityLimitProcessorOverrideType", "ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit", - "ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode", "ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit", - "ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode", + "ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode", + "ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode", "ObservabilityPipelineTagCardinalityLimitProcessorType", "ObservabilityPipelineThrottleProcessor", "ObservabilityPipelineThrottleProcessorType", @@ -14262,6 +14283,13 @@ "PowerpacksResponseMeta", "PowerpacksResponseMetaPagination", "PreviewEntityResponseData", + "PrintReportRequest", + "PrintReportRequestAttributes", + "PrintReportRequestData", + "PrintReportResponse", + "PrintReportResponseAttributes", + "PrintReportResponseData", + "PrintReportType", "ProcessDataSource", "ProcessScalarQuery", "ProcessSummariesMeta", diff --git a/tests/v2/features/report_schedules.feature b/tests/v2/features/report_schedules.feature index aa62a5e350..0404548871 100644 --- a/tests/v2/features/report_schedules.feature +++ b/tests/v2/features/report_schedules.feature @@ -99,6 +99,27 @@ Feature: Report Schedules When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: List dataset report schedules returns "Bad Request" response + Given new "ListDatasetReportSchedules" request + And request contains "dataset_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: List dataset report schedules returns "Not Found" response + Given new "ListDatasetReportSchedules" request + And request contains "dataset_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: List dataset report schedules returns "OK" response + Given new "ListDatasetReportSchedules" request + And request contains "dataset_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/reporting-and-sharing Scenario: List report schedules returns "Bad Request" response Given new "ListReportSchedules" request @@ -117,6 +138,34 @@ Feature: Report Schedules When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Print a report returns "Bad Request" response + Given new "PrintReport" request + And body with value {"data": {"attributes": {"from_ts": 1780318800000, "resource_id": "abc-def-ghi", "resource_type": "dashboard", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "1w", "timezone": "America/New_York", "to_ts": 1780923600000}, "type": "report"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Print a report returns "Not Found" response + Given new "PrintReport" request + And body with value {"data": {"attributes": {"from_ts": 1780318800000, "resource_id": "abc-def-ghi", "resource_type": "dashboard", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "1w", "timezone": "America/New_York", "to_ts": 1780923600000}, "type": "report"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Print a report returns "OK" response + Given new "PrintReport" request + And body with value {"data": {"attributes": {"from_ts": 1780318800000, "resource_id": "abc-def-ghi", "resource_type": "dashboard", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "1w", "timezone": "America/New_York", "to_ts": 1780923600000}, "type": "report"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Print a report returns "Unprocessable Entity" response + Given new "PrintReport" request + And body with value {"data": {"attributes": {"from_ts": 1780318800000, "resource_id": "abc-def-ghi", "resource_type": "dashboard", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "1w", "timezone": "America/New_York", "to_ts": 1780923600000}, "type": "report"}} + When the request is sent + Then the response status is 422 Unprocessable Entity + @generated @skip @team:DataDog/reporting-and-sharing Scenario: Toggle a report schedule returns "Bad Request" response Given new "ToggleReportSchedule" request diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 22089f0ece..36d5bd4d94 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -6470,6 +6470,18 @@ "type": "idempotent" } }, + "ListDatasetReportSchedules": { + "tag": "Report Schedules", + "undo": { + "type": "safe" + } + }, + "PrintReport": { + "tag": "Report Schedules", + "undo": { + "type": "unsafe" + } + }, "CreateReportSchedule": { "tag": "Report Schedules", "undo": {